gunnertechnology 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +4 -0
  3. data/README +0 -0
  4. data/Rakefile +2 -0
  5. data/gunnertechnology.gemspec +28 -0
  6. data/lib/generators/project/USAGE +8 -0
  7. data/lib/generators/project/project_generator.rb +61 -0
  8. data/lib/generators/project/templates/app/controllers/authentications_controller.rb +85 -0
  9. data/lib/generators/project/templates/app/models/authentication.rb +17 -0
  10. data/lib/generators/project/templates/app/views/layouts/application.html.erb +77 -0
  11. data/lib/generators/project/templates/app/views/shared/_facebook_init.html.erb +12 -0
  12. data/lib/generators/project/templates/app/views/shared/_flash_messages.html.erb +7 -0
  13. data/lib/generators/project/templates/app/views/shared/_footer.html.erb +15 -0
  14. data/lib/generators/project/templates/app/views/shared/_google_analytics.html.erb +11 -0
  15. data/lib/generators/project/templates/app/views/shared/_header.html.erb +23 -0
  16. data/lib/generators/project/templates/config/facebook_config.yml +29 -0
  17. data/lib/generators/project/templates/config/google_analytics_config.yml +8 -0
  18. data/lib/generators/project/templates/config/initializers/load_facebook_config.rb +2 -0
  19. data/lib/generators/project/templates/config/initializers/load_google_analytics_config.rb +2 -0
  20. data/lib/generators/project/templates/config/initializers/load_seo_config.rb +2 -0
  21. data/lib/generators/project/templates/config/initializers/omniauth.rb +91 -0
  22. data/lib/generators/project/templates/config/providers.yml +27 -0
  23. data/lib/generators/project/templates/config/seo_config.yml +8 -0
  24. data/lib/generators/project/templates/db/create_authentications.rb +21 -0
  25. data/lib/generators/project/templates/public/javascripts/libs/PIE.htc +73 -0
  26. data/lib/generators/project/templates/public/javascripts/libs/colorpicker.js +484 -0
  27. data/lib/generators/project/templates/public/javascripts/libs/dd_belatedpng.js +13 -0
  28. data/lib/generators/project/templates/public/javascripts/libs/eye.js +34 -0
  29. data/lib/generators/project/templates/public/javascripts/libs/head.js +8 -0
  30. data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-en.js +130 -0
  31. data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-es.js +124 -0
  32. data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-fr.js +119 -0
  33. data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-it.js +103 -0
  34. data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-pt.js +125 -0
  35. data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine-ro.js +126 -0
  36. data/lib/generators/project/templates/public/javascripts/libs/jquery.validationEngine.js +1137 -0
  37. data/lib/generators/project/templates/public/javascripts/libs/layout.js +67 -0
  38. data/lib/generators/project/templates/public/javascripts/libs/modernizr-1.6.min.js +30 -0
  39. data/lib/generators/project/templates/public/javascripts/libs/utils.js +252 -0
  40. data/lib/generators/project/templates/public/javascripts/mylibs/.gitignore +3 -0
  41. data/lib/generators/project/templates/public/javascripts/plugins.js +38 -0
  42. data/lib/generators/project/templates/public/javascripts/profiling/config.js +59 -0
  43. data/lib/generators/project/templates/public/javascripts/profiling/yahoo-profiling.min.js +39 -0
  44. data/lib/generators/project/templates/public/javascripts/script.js +46 -0
  45. data/lib/generators/project/templates/public/stylesheets/grids/1008_24_10_10.css +201 -0
  46. data/lib/generators/project/templates/public/stylesheets/grids/fluid.css +320 -0
  47. data/lib/generators/project/templates/public/stylesheets/handheld.css +8 -0
  48. data/lib/generators/project/templates/public/stylesheets/profiling/yahoo-profiling.css +7 -0
  49. data/lib/generators/project/templates/public/stylesheets/reset.css +53 -0
  50. data/lib/generators/project/templates/public/stylesheets/text.css +84 -0
  51. data/lib/generators/project/templates/public/stylesheets/validationEngine.jquery.css +142 -0
  52. data/lib/generators/project/templates/public/swfs/charts.swf +0 -0
  53. data/lib/gunnertechnology/version.rb +3 -0
  54. data/lib/gunnertechnology.rb +47 -0
  55. metadata +206 -0
@@ -0,0 +1,34 @@
1
+ /**
2
+ *
3
+ * Zoomimage
4
+ * Author: Stefan Petre www.eyecon.ro
5
+ *
6
+ */
7
+ (function($){
8
+ var EYE = window.EYE = function() {
9
+ var _registered = {
10
+ init: []
11
+ };
12
+ return {
13
+ init: function() {
14
+ $.each(_registered.init, function(nr, fn){
15
+ fn.call();
16
+ });
17
+ },
18
+ extend: function(prop) {
19
+ for (var i in prop) {
20
+ if (prop[i] != undefined) {
21
+ this[i] = prop[i];
22
+ }
23
+ }
24
+ },
25
+ register: function(fn, type) {
26
+ if (!_registered[type]) {
27
+ _registered[type] = [];
28
+ }
29
+ _registered[type].push(fn);
30
+ }
31
+ };
32
+ }();
33
+ $(EYE.init);
34
+ })(jQuery);
@@ -0,0 +1,8 @@
1
+ /**
2
+ Head JS The only script in your <HEAD>
3
+ Copyright Tero Piirainen (tipiirai)
4
+ License MIT / http://bit.ly/mit-license
5
+ Version 0.8
6
+
7
+ http://headjs.com
8
+ */(function(a){var b=a.documentElement,c={screens:[320,480,640,768,1024,1280,1440,1680,1920],section:"-section",page:"-page",head:"head"},d=[];if(window.head_conf)for(var e in head_conf)head_conf[e]&&(c[e]=head_conf[e]);function f(a){d.push(a)}function g(a){var c=new RegExp("\\b"+a+"\\b");b.className=b.className.replace(c,"")}function h(a,b){for(var c=0;c<a.length;c++)b.call(a,a[c],c)}var i=window[c.head]=function(){i.ready.apply(null,arguments)};i.feature=function(a,c,e){{if(a){Object.prototype.toString.call(c)=="[object Function]"&&(c=c.call()),f((c?"":"no-")+a),i[a]=!!c,e||(g("no-"+a),g(a),i.feature());return i}b.className+=" "+d.join(" "),d=[]}};var j=navigator.userAgent.toLowerCase();j=/(webkit)[ \/]([\w.]+)/.exec(j)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(j)||/(msie) ([\w.]+)/.exec(j)||!/compatible/.test(j)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(j)||[],j[1]=="msie"&&(j[1]="ie"),f(j[1]),i.browser={version:j[2]},i.browser[j[1]]=true;if(i.browser.ie)for(var k=3;k<11;k++)parseFloat(j[2])<k&&f("lt-ie"+k);h("abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video".split("|"),function(b){a.createElement(b)}),h(location.pathname.split("/"),function(a,d){if(this.length>2&&this[d+1]!==undefined)d&&f(this.slice(1,d+1).join("-")+c.section);else{var e=a||"index",g=e.indexOf(".");g>0&&(e=e.substring(0,g)),b.id=e+c.page,d||f("root"+c.section)}});function l(){var a=window.outerWidth||b.clientWidth;b.className=b.className.replace(/ (w|lt)-\d+/g,""),f("w-"+Math.round(a/100)*100),h(c.screens,function(b){a<=b&&f("lt-"+b)}),i.feature()}l(),window.onresize=l,i.feature("js",true).feature()})(document),function(){var a=document.createElement("i"),b=a.style,c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="Webkit Moz O ms Khtml".split(" "),e=window.head_conf&&head_conf.head||"head",f=window[e];function g(a){for(var c in a)if(b[a[c]]!==undefined)return true}function h(a){var b=a.charAt(0).toUpperCase()+a.substr(1),c=(a+" "+d.join(b+" ")+b).split(" ");return!!g(c)}var i={gradient:function(){var a="background-image:",d="gradient(linear,left top,right bottom,from(#9f9),to(#fff));",e="linear-gradient(left top,#eee,#fff);";b.cssText=(a+c.join(d+a)+c.join(e+a)).slice(0,-a.length);return!!b.backgroundImage},rgba:function(){b.cssText="background-color:rgba(0,0,0,0.5)";return!!b.backgroundColor},opacity:function(){return a.style.opacity===""},textshadow:function(){return b.textShadow===""},multiplebgs:function(){b.cssText="background:url(//:),url(//:),red url(//:)";return(new RegExp("(url\\s*\\(.*?){3}")).test(b.background)},boxshadow:function(){return h("boxShadow")},borderimage:function(){return h("borderImage")},borderradius:function(){return h("borderRadius")},reflections:function(){return h("boxReflect")},transforms:function(){return h("transform")},transitions:function(){return h("transition")}};for(var j in i)i[j]&&f.feature(j,i[j].call(),true);f.feature()}(),function(a){var b=a.documentElement,c=navigator.userAgent.toLowerCase().indexOf("msie")!=-1,d=false,e=[],f={},g={},h=a.createElement("script").async===true||"MozAppearance"in a.documentElement.style||window.opera;var i=window.head_conf&&head_conf.head||"head",j=window[i]=window[i]||function(){j.ready.apply(null,arguments)};var k=0,l=1,m=2,n=3;h?j.js=function(){var a=arguments,b=a[a.length-1],c=[];r(b)||(b=null),q(a,function(d,e){d!=b&&(d=p(d),c.push(d),v(d,b&&e==a.length-2?function(){s(c)&&b()}:null))});return j}:j.js=function(){var a=arguments,b=[].slice.call(a,1),c=b[0];if(!d){e.push(function(){j.js.apply(null,a)});return j}c?(q(b,function(a){r(a)||u(p(a))}),v(p(a[0]),r(c)?c:function(){j.js.apply(null,b)})):v(p(a[0]));return j},j.ready=function(a,b){r(a)&&(b=a,a="ALL");var c=g[a];if(c&&c.state==n||a=="ALL"&&s()){b();return j}var d=f[a];d?d.push(b):d=f[a]=[b];return j};function o(a){var b=a.split("/"),c=b[b.length-1],d=c.indexOf("?");return d!=-1?c.substring(0,d):c}function p(a){var b;if(typeof a=="object")for(var c in a)a[c]&&(b={name:c,url:a[c]});else b={name:o(a),url:a};var d=g[b.name];if(d)return d;for(var e in g)if(g[e].url==b.url)return g[e];g[b.name]=b;return b}function q(a,b){if(a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c<a.length;c++)b.call(a,a[c],c)}}function r(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a){a=a||g;var b=false;for(var c in a){if(a[c].state!=n)return false;b=true}return b}function t(a){a.state=k,q(a.onpreload,function(a){a.call()})}function u(a,b){a.state||(a.state=l,a.onpreload=[],w({src:a.url,type:"cache"},function(){t(a)}))}function v(a,b){if(a.state==n&&b)return b();if(a.state==m)return j.ready(a.name,b);if(a.state==l)return a.onpreload.push(function(){v(a,b)});a.state=m,w(a.url,function(){a.state=n,b&&b(),q(f[a.name],function(a){a()}),s()&&q(f.ALL,function(a){a.done||a(),a.done=true})})}function w(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=false,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d(),d.done=true)},b.appendChild(e)}setTimeout(function(){d=true,q(e,function(a){a()})},300),!a.readyState&&a.addEventListener&&(a.readyState="loading",a.addEventListener("DOMContentLoaded",handler=function(){a.removeEventListener("DOMContentLoaded",handler,false),a.readyState="complete"},false))}(document)
@@ -0,0 +1,130 @@
1
+
2
+ (function($){
3
+ $.fn.validationEngineLanguage = function(){
4
+ };
5
+ $.validationEngineLanguage = {
6
+ newLang: function(){
7
+ $.validationEngineLanguage.allRules = {
8
+ "required": { // Add your regex rules here, you can take telephone as an example
9
+ "regex": "none",
10
+ "alertText": "* This field is required",
11
+ "alertTextCheckboxMultiple": "* Please select an option",
12
+ "alertTextCheckboxe": "* This checkbox is required"
13
+ },
14
+ "minSize": {
15
+ "regex": "none",
16
+ "alertText": "* Minimum ",
17
+ "alertText2": " characters allowed"
18
+ },
19
+ "maxSize": {
20
+ "regex": "none",
21
+ "alertText": "* Maximum ",
22
+ "alertText2": " characters allowed"
23
+ },
24
+ "min": {
25
+ "regex": "none",
26
+ "alertText": "* Minimum value is "
27
+ },
28
+ "max": {
29
+ "regex": "none",
30
+ "alertText": "* Maximum value is "
31
+ },
32
+ "past": {
33
+ "regex": "none",
34
+ "alertText": "* Date prior to "
35
+ },
36
+ "future": {
37
+ "regex": "none",
38
+ "alertText": "* Date past "
39
+ },
40
+ "maxCheckbox": {
41
+ "regex": "none",
42
+ "alertText": "* Checks allowed Exceeded"
43
+ },
44
+ "minCheckbox": {
45
+ "regex": "none",
46
+ "alertText": "* Please select ",
47
+ "alertText2": " options"
48
+ },
49
+ "equals": {
50
+ "regex": "none",
51
+ "alertText": "* Fields do not match"
52
+ },
53
+ "phone": {
54
+ // credit: jquery.h5validate.js / orefalo
55
+ "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
56
+ "alertText": "* Invalid phone number"
57
+ },
58
+ "email": {
59
+ // Simplified, was not working in the Iphone browser
60
+ "regex": /^([A-Za-z0-9_\-\.\'])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,6})$/,
61
+ "alertText": "* Invalid email address"
62
+ },
63
+ "integer": {
64
+ "regex": /^[\-\+]?\d+$/,
65
+ "alertText": "* Not a valid integer"
66
+ },
67
+ "number": {
68
+ // Number, including positive, negative, and floating decimal. credit: orefalo
69
+ "regex": /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
70
+ "alertText": "* Invalid floating decimal number"
71
+ },
72
+ "date": {
73
+ // Date in ISO format. Credit: bassistance
74
+ "regex": /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
75
+ "alertText": "* Invalid date, must be in YYYY-MM-DD format"
76
+ },
77
+ "ipv4": {
78
+ "regex": /^([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+$/,
79
+ "alertText": "* Invalid IP address"
80
+ },
81
+ "url": {
82
+ "regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,
83
+ "alertText": "* Invalid URL"
84
+ },
85
+ "onlyNumberSp": {
86
+ "regex": /^[0-9\ ]+$/,
87
+ "alertText": "* Numbers only"
88
+ },
89
+ "onlyLetterSp": {
90
+ "regex": /^[a-zA-Z\ \']+$/,
91
+ "alertText": "* Letters only"
92
+ },
93
+ "onlyLetterNumber": {
94
+ "regex": /^[0-9a-zA-Z]+$/,
95
+ "alertText": "* No special characters allowed"
96
+ },
97
+ "onlyLetterNumberUnderscoreHyphen": {
98
+ "regex": /^[0-9a-zA-Z_\-]+$/,
99
+ "alertText": "* Only letters, numbers underscors and hyphens allowed"
100
+ },
101
+ // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
102
+ "ajaxUserCall": {
103
+ "url": "ajaxValidateFieldUser",
104
+ // you may want to pass extra data on the ajax call
105
+ "extraData": "name=eric",
106
+ "alertText": "* This user is already taken",
107
+ "alertTextLoad": "* Validating, please wait"
108
+ },
109
+ "ajaxNameCall": {
110
+ // remote json service location
111
+ "url": "ajaxValidateFieldName",
112
+ // error
113
+ "alertText": "* This name is already taken",
114
+ // if you provide an "alertTextOk", it will show as a green prompt when the field validates
115
+ "alertTextOk": "* This name is available",
116
+ // speaks by itself
117
+ "alertTextLoad": "* Validating, please wait"
118
+ },
119
+ "validate2fields": {
120
+ "alertText": "* Please input HELLO"
121
+ }
122
+ };
123
+
124
+ }
125
+ };
126
+ $.validationEngineLanguage.newLang();
127
+ })(jQuery);
128
+
129
+
130
+
@@ -0,0 +1,124 @@
1
+ 
2
+ (function($){
3
+ $.fn.validationEngineLanguage = function(){
4
+ };
5
+ $.validationEngineLanguage = {
6
+ newLang: function(){
7
+ $.validationEngineLanguage.allRules = {
8
+ "required": { // Add your regex rules here, you can take telephone as an example
9
+ "regex": "none",
10
+ "alertText": "* Este campo está requerido",
11
+ "alertTextCheckboxMultiple": "* Por favor selecciona una opción",
12
+ "alertTextCheckboxe": "* Este checkbox está requerido"
13
+ },
14
+ "minSize": {
15
+ "regex": "none",
16
+ "alertText": "* Mínimo de ",
17
+ "alertText2": " caracteres autorizados"
18
+ },
19
+ "maxSize": {
20
+ "regex": "none",
21
+ "alertText": "* Máximo de ",
22
+ "alertText2": " caracteres autorizados"
23
+ },
24
+ "min": {
25
+ "regex": "none",
26
+ "alertText": "* Valor mínimo es "
27
+ },
28
+ "max": {
29
+ "regex": "none",
30
+ "alertText": "* Valor máximo es "
31
+ },
32
+ "past": {
33
+ "regex": "none",
34
+ "alertText": "* Fecha anterior a "
35
+ },
36
+ "future": {
37
+ "regex": "none",
38
+ "alertText": "* Fecha posterior a "
39
+ },
40
+ "maxCheckbox": {
41
+ "regex": "none",
42
+ "alertText": "* Se ha excedido el número de opciones permitidas"
43
+ },
44
+ "minCheckbox": {
45
+ "regex": "none",
46
+ "alertText": "* Por favor seleccione ",
47
+ "alertText2": " opciones"
48
+ },
49
+ "equals": {
50
+ "regex": "none",
51
+ "alertText": "* Los campos no coinciden"
52
+ },
53
+ "phone": {
54
+ // credit: jquery.h5validate.js / orefalo
55
+ "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
56
+ "alertText": "* Número de teléfono inválido"
57
+ },
58
+ "email": {
59
+ // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
60
+ "regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/,
61
+ "alertText": "* Correo inválido"
62
+ },
63
+ "integer": {
64
+ "regex": /^[\-\+]?\d+$/,
65
+ "alertText": "* No es un valor entero válido"
66
+ },
67
+ "number": {
68
+ // Number, including positive, negative, and floating decimal. credit: orefalo
69
+ "regex": /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
70
+ "alertText": "* No es un valor decimal válido"
71
+ },
72
+ "date": {
73
+ // Date in ISO format. Credit: bassistance
74
+ "regex": /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
75
+ "alertText": "* Fecha inválida, por favor utilize el formato AAAA-MM-DD"
76
+ },
77
+ "ipv4": {
78
+ "regex": /^([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+$/,
79
+ "alertText": "* Direccion IP inválida"
80
+ },
81
+ "url": {
82
+ "regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,
83
+ "alertText": "* URL Inválida"
84
+ },
85
+ "onlyNumberSp": {
86
+ "regex": /^[0-9\ ]+$/,
87
+ "alertText": "* Sólo números"
88
+ },
89
+ "onlyLetterSp": {
90
+ "regex": /^[a-zA-Z\ \']+$/,
91
+ "alertText": "* Sólo letras"
92
+ },
93
+ "onlyLetterNumber": {
94
+ "regex": /^[0-9a-zA-Z]+$/,
95
+ "alertText": "* No se permiten caracteres especiales"
96
+ },
97
+ // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
98
+ "ajaxUserCall": {
99
+ "url": "ajaxValidateFieldUser",
100
+ // you may want to pass extra data on the ajax call
101
+ "extraData": "name=eric",
102
+ "alertTextLoad": "* Cargando, espere por favor",
103
+ "alertText": "* Este nombre de usuario ya se encuentra usado"
104
+ },
105
+ "ajaxNameCall": {
106
+ // remote json service location
107
+ "url": "ajaxValidateFieldName",
108
+ // error
109
+ "alertText": "* Este nombre ya se encuentra usado",
110
+ // if you provide an "alertTextOk", it will show as a green prompt when the field validates
111
+ "alertTextOk": "* Este nombre está disponible",
112
+ // speaks by itself
113
+ "alertTextLoad": "* Cargando, espere por favor"
114
+ },
115
+ "validate2fields": {
116
+ "alertText": "* Por favor entrar HELLO"
117
+ }
118
+ };
119
+
120
+ }
121
+ };
122
+ $.validationEngineLanguage.newLang();
123
+ })(jQuery);
124
+
@@ -0,0 +1,119 @@
1
+
2
+
3
+ (function($){
4
+ $.fn.validationEngineLanguage = function(){
5
+ };
6
+ $.validationEngineLanguage = {
7
+ newLang: function(){
8
+ $.validationEngineLanguage.allRules = {
9
+ "required": {
10
+ "regex": "none",
11
+ "alertText": "* Ce champs est requis",
12
+ "alertTextCheckboxMultiple": "* Choisir une option",
13
+ "alertTextCheckboxe": "* Cette option est requise"
14
+ },
15
+ "minSize": {
16
+ "regex": "none",
17
+ "alertText": "* Minimum ",
18
+ "alertText2": " caracteres requis"
19
+ },
20
+ "maxSize": {
21
+ "regex": "none",
22
+ "alertText": "* Maximum ",
23
+ "alertText2": " caracteres requis"
24
+ },
25
+ "min": {
26
+ "regex": "none",
27
+ "alertText": "* Valeur minimum requise "
28
+ },
29
+ "max": {
30
+ "regex": "none",
31
+ "alertText": "* Valeur maximum requise "
32
+ },
33
+ "past": {
34
+ "regex": "none",
35
+ "alertText": "* Date antérieure au "
36
+ },
37
+ "future": {
38
+ "regex": "none",
39
+ "alertText": "* Date postérieure au "
40
+ },
41
+ "maxCheckbox": {
42
+ "regex": "none",
43
+ "alertText": "* Nombre max de choix excédé"
44
+ },
45
+ "minCheckbox": {
46
+ "regex": "none",
47
+ "alertText": "* Veuillez choisir ",
48
+ "alertText2": " options"
49
+ },
50
+ "equals": {
51
+ "regex": "none",
52
+ "alertText": "* Votre champs n'est pas identique"
53
+ },
54
+ "phone": {
55
+ // credit: jquery.h5validate.js / orefalo
56
+ "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
57
+ "alertText": "* Numéro de téléphone invalide"
58
+ },
59
+ "email": {
60
+ // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
61
+ "regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/,
62
+ "alertText": "* Adresse email invalide"
63
+ },
64
+ "integer": {
65
+ "regex": /^[\-\+]?\d+$/,
66
+ "alertText": "* Nombre entier invalide"
67
+ },
68
+ "number": {
69
+ // Number, including positive, negative, and floating decimal. credit: orefalo
70
+ "regex": /^[\-\+]?(([0-9]+)([\.,]([0-9]+))?|([\.,]([0-9]+))?)$/,
71
+ "alertText": "* Nombre flottant invalide"
72
+ },
73
+ "date": {
74
+ // Date in ISO format. Credit: bassistance
75
+ "regex": /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
76
+ "alertText": "* Date invalide, format YYYY-MM-DD requis"
77
+ },
78
+ "ipv4": {
79
+ "regex": /([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+/,
80
+ "alertText": "* Adresse IP invalide"
81
+ },
82
+ "url": {
83
+ "regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,
84
+ "alertText": "* URL invalide"
85
+ },
86
+ "onlyNumberSp": {
87
+ "regex": /^[0-9\ ]+$/,
88
+ "alertText": "* Seules les chiffres sont acceptées"
89
+ },
90
+ "onlyLetterSp": {
91
+ "regex": /^[a-zA-Z\ \']+$/,
92
+ "alertText": "* Seules les lettres sont acceptées"
93
+ },
94
+ "onlyLetterNumber": {
95
+ "regex": /^[0-9a-zA-Z]+$/,
96
+ "alertText": "* Aucun caractère spécial n'est accepté"
97
+ },
98
+ // --- CUSTOM RULES -- Those are specific to the demos, they can be removed or changed to your likings
99
+ "ajaxUserCall": {
100
+ "url": "ajaxValidateFieldUser",
101
+ "extraData": "name=eric",
102
+ "alertTextLoad": "* Chargement, veuillez attendre",
103
+ "alertText": "* Ce nom est déjà pris"
104
+ },
105
+ "ajaxNameCall": {
106
+ "url": "ajaxValidateFieldName",
107
+ "alertText": "* Ce nom est déjà pris",
108
+ "alertTextOk": "*Ce nom est disponible",
109
+ "alertTextLoad": "* Chargement, veuillez attendre"
110
+ },
111
+ "validate2fields": {
112
+ "alertText": "Veuillez taper le mot HELLO"
113
+ }
114
+ };
115
+ }
116
+ };
117
+ $.validationEngineLanguage.newLang();
118
+ })(jQuery);
119
+
@@ -0,0 +1,103 @@
1
+
2
+ (function($){
3
+ $.fn.validationEngineLanguage = function(){
4
+ };
5
+ $.validationEngineLanguage = {
6
+ newLang: function(){
7
+ $.validationEngineLanguage.allRules = {
8
+ "required": { // Add your regex rules here, you can take telephone as an example
9
+ "regex": "none",
10
+ "alertText": "* Campo richiesto",
11
+ "alertTextCheckboxMultiple": "* Per favore selezionare un'opzione",
12
+ "alertTextCheckboxe": "* E' richiesta la selezione della casella"
13
+ },
14
+ "length": {
15
+ "regex": "none",
16
+ "alertText": "* Fra ",
17
+ "alertText2": " e ",
18
+ "alertText3": " caratteri permessi"
19
+ },
20
+ "maxCheckbox": {
21
+ "regex": "none",
22
+ "alertText": "* Numero di caselle da selezionare in eccesso"
23
+ },
24
+ "minCheckbox": {
25
+ "regex": "none",
26
+ "alertText": "* Per favore selezionare ",
27
+ "alertText2": " opzioni"
28
+ },
29
+ "equals": {
30
+ "regex": "none",
31
+ "alertText": "* I campi non corrispondono"
32
+ },
33
+ "phone": {
34
+ // credit: jquery.h5validate.js / orefalo
35
+ "regex": /^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
36
+ "alertText": "* Numero di telefono non corretto"
37
+ },
38
+ "email": {
39
+ // Shamelessly lifted from Scott Gonzalez via the Bassistance Validation plugin http://projects.scottsplayground.com/email_address_validation/
40
+ "regex": /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/,
41
+ "alertText": "* Indirizzo non corretto"
42
+ },
43
+ "integer": {
44
+ "regex": /^[\-\+]?\d+$/,
45
+ "alertText": "* Numero intero non corretto"
46
+ },
47
+ "number": {
48
+ // Number, including positive, negative, and floating decimal. Credit: bassistance
49
+ "regex": /^[\-\+]?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)$/,
50
+ "alertText": "* Numero decimale non corretto"
51
+ },
52
+ "date": {
53
+ // Date in ISO format. Credit: bassistance
54
+ "regex": /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
55
+ "alertText": "* Data non corretta, re-inserire secondo formato AAAA-MM-GG"
56
+ },
57
+
58
+ "ipv4": {
59
+ "regex": /^([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+\.([1-9][0-9]{0,2})+$/,
60
+ "alertText": "* IP non corretto"
61
+ },
62
+ "url": {
63
+ "regex": /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/,
64
+ "alertText": "* URL non corretta"
65
+ },
66
+ "onlyNumber": {
67
+ "regex": /^[0-9\ ]+$/,
68
+ "alertText": "* Solo numeri"
69
+ },
70
+ "onlyLetter": {
71
+ "regex": /^[a-zA-Z\ \']+$/,
72
+ "alertText": "* Solo lettere"
73
+ },
74
+ "validate2fields": {
75
+ "nname": "validate2fields",
76
+ "alertText": "* Occorre inserire nome e cognome"
77
+ },
78
+ "noSpecialCharacters": {
79
+ "regex": /^[0-9a-zA-Z]+$/,
80
+ "alertText": "* Caratteri speciali non permessi"
81
+ },
82
+ "ajaxUserCall": {
83
+ "file": "ajaxValidateFieldName",
84
+ "extraData": "name=eric",
85
+ "alertTextLoad": "* Caricamento, attendere per favore",
86
+ "alertText": "* Questo user � gi� stato utilizzato"
87
+ },
88
+ "ajaxNameCall": {
89
+ "file": "ajaxValidateFieldName",
90
+ "alertText": "* Questo nome � gi� stato utilizzato",
91
+ "alertTextOk": "* Questo nome � disponibile",
92
+ "alertTextLoad": "* Caricamento, attendere per favore"
93
+ }
94
+
95
+ };
96
+
97
+ }
98
+ };
99
+ })(jQuery);
100
+
101
+ $(document).ready(function(){
102
+ $.validationEngineLanguage.newLang();
103
+ });