├── docs ├── 进度.txt ├── jquery-validate的用户和说明.docx └── ~$uery-validate的用户和说明.docx ├── demo ├── img │ ├── tmp │ │ ├── 160x120.gif │ │ ├── 260x180.gif │ │ ├── 360x268.gif │ │ └── 670x240.gif │ ├── glyphicons-halflings.png │ └── glyphicons-halflings-white.png ├── css │ ├── prettify_bootstrap.css │ ├── site.css │ └── bootstrap-responsive.min.css ├── login.htm ├── js │ ├── site.js │ ├── prettify.js │ └── bootstrap.min.js ├── blank.htm ├── files.htm ├── profile.htm ├── settings.htm ├── tasks.htm ├── help.htm ├── help-inner.htm ├── projects.htm ├── activity.htm ├── messages.htm ├── gallery.htm └── index.html ├── README.md ├── jquery-validation ├── jquery.validate.zh-CN.js ├── jquery.metadata.js └── jquery.validate.methods.js └── LICENSE /docs/进度.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangko27/jquery-validate-zh-CN/HEAD/docs/进度.txt -------------------------------------------------------------------------------- /demo/img/tmp/160x120.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangko27/jquery-validate-zh-CN/HEAD/demo/img/tmp/160x120.gif -------------------------------------------------------------------------------- /demo/img/tmp/260x180.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangko27/jquery-validate-zh-CN/HEAD/demo/img/tmp/260x180.gif -------------------------------------------------------------------------------- /demo/img/tmp/360x268.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangko27/jquery-validate-zh-CN/HEAD/demo/img/tmp/360x268.gif -------------------------------------------------------------------------------- /demo/img/tmp/670x240.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangko27/jquery-validate-zh-CN/HEAD/demo/img/tmp/670x240.gif -------------------------------------------------------------------------------- /docs/jquery-validate的用户和说明.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangko27/jquery-validate-zh-CN/HEAD/docs/jquery-validate的用户和说明.docx -------------------------------------------------------------------------------- /docs/~$uery-validate的用户和说明.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangko27/jquery-validate-zh-CN/HEAD/docs/~$uery-validate的用户和说明.docx -------------------------------------------------------------------------------- /demo/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangko27/jquery-validate-zh-CN/HEAD/demo/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | jquery-validate-zh-CN 2 | ===================== 3 | 4 | 适合web项目中的前端jquery的表单校验,使用非常简单,非常容易修改. 5 | 6 | 描述: 7 | 使用bootstrap来做网页版的开发。 8 | -------------------------------------------------------------------------------- /demo/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangko27/jquery-validate-zh-CN/HEAD/demo/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /demo/css/prettify_bootstrap.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #D14; } 6 | .kwd, .linenums .tag { color: #1e347b; } 7 | .typ, .atn, .dec, .var { color: teal; } 8 | .pln { color: #48484c; } 9 | 10 | .prettyprint { 11 | padding: 8px; 12 | background-color: #f7f7f9; 13 | border: 1px solid #e1e1e8; 14 | } 15 | .prettyprint.linenums { 16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 19 | } 20 | 21 | /* Specify class=linenums on a pre to get line numbering */ 22 | ol.linenums { 23 | margin: 0 0 0 33px; /* IE indents via margin-left */ 24 | } 25 | ol.linenums li { 26 | padding-left: 12px; 27 | color: #bebec5; 28 | line-height: 18px; 29 | text-shadow: 0 1px 0 #fff; 30 | } -------------------------------------------------------------------------------- /jquery-validation/jquery.validate.zh-CN.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Translated default messages for the jQuery validation plugin. 3 | * Locale: CN 4 | */ 5 | jQuery.extend(jQuery.validator.messages, { 6 | required: "此内容为必填项,请输入!", 7 | remote: "内容输入错误!", 8 | email: "E-mail格式错误,请重新输入!", 9 | url: "网址格式错误,请重新输入!", 10 | date: "日期格式错误,请重新输入!", 11 | dateISO: "日期格式错误,请重新输入!", 12 | number: "请输入合法的数字!", 13 | digits: "请输入零或正整数!", 14 | creditcard: "信用卡号格式错误,请重新输入!", 15 | equalTo: "两次输入不一致,请重新输入!", 16 | accept: "请输入拥有合法后缀名的字符串!", 17 | maxlength: jQuery.validator.format("字符串长度不能大于{0}!"), 18 | minlength: jQuery.validator.format("字符串长度不能小于{0}!"), 19 | rangelength: jQuery.validator.format("字符串长度只允许在{0}-{1}之间!"), 20 | range: jQuery.validator.format("输入的数值只允许在{0}-{1}之间!"), 21 | max: jQuery.validator.format("输入的数值不允许大于{0}!"), 22 | min: jQuery.validator.format("输入的数值不允许小于{0}!"), 23 | integer: "请输入合法的整数!", 24 | positive: "请输入合法的正数!", 25 | positiveInteger: "请输入合法的正整数!", 26 | mobile: "手机号码格式错误,请重新输入!", 27 | phone: "电话号码格式错误,请重新输入!", 28 | zipCode: "邮政编码格式错误,请重新输入!", 29 | requiredTo: "此内容为必填项,请输入!", 30 | username: "只允许包含中文、英文、数字和下划线!", 31 | prefix: "请输入以 {0} 开头的字符串!", 32 | lettersonly: "只允许包含字母!" 33 | }); -------------------------------------------------------------------------------- /demo/login.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Login - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |

Akira Login

16 |
17 |
18 |
19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /demo/css/site.css: -------------------------------------------------------------------------------- 1 | /* Akira CSS by Shawn Drew */ 2 | 3 | /* general */ 4 | body {padding-top:20px; padding-bottom:20px;} 5 | 6 | h1 {padding-bottom:0.2em;} 7 | 8 | .meta {color:#999; font-size:.9em; display:block;} 9 | .meta em {font-style:normal; font-weight:bold;} 10 | 11 | /* login */ 12 | #login-page.container {width:320px;} 13 | 14 | /* dashboard */ 15 | .summary {display:table; width:100%; padding:0; margin:0 0 20px 0;} 16 | .summary ul {margin:0; padding:0; overflow:hidden; display:table-row;} 17 | .summary li {margin:0; padding:19px; display:table-cell; border-right:1px solid #eee;} 18 | .summary li:last-child {border:none;} 19 | .summary a {display:block; font-size:1.2em; line-height:1.4em; text-transform:uppercase; color:#000;} 20 | .summary .count {display:block; font-size:1.75em; font-weight:bold;} 21 | 22 | /* dashboard - ie fixes */ 23 | .ie7 .summary {display:block;} 24 | .ie7 .summary ul {margin:0; padding:0; overflow:hidden; display:block;} 25 | .ie7 .summary li {float:left;} 26 | 27 | .ielt9 .summary .last {border:none;} 28 | 29 | /* tasks */ 30 | .tasks {margin:0; padding:0;} 31 | .tasks li {list-style-type:none; padding-bottom:0.3em;} 32 | .tasks input {vertical-align:baseline;} 33 | .tasks .meta {padding-left:18px;} 34 | .tasks.done {opacity:0.8;} 35 | 36 | /* messages */ 37 | .messages {margin:0; padding:0;} 38 | .messages .messages {padding-top:19px;} 39 | .messages li {list-style-type:none; padding-bottom:0.3em;} 40 | .messages .well {padding:19px;} 41 | .messages .messages .well {border:none; -webkit-box-shadow:none;-moz-box-shadow:none; box-shadow:none; border-left:3px solid #eee;border-left:3px solid rgba(0, 0, 0, 0.05);} 42 | 43 | /* blank slate */ 44 | .blank-slate {text-align:center;} 45 | 46 | /* files */ 47 | .files li {list-style-type:none;} 48 | .files .meta {padding-left:18px;} 49 | 50 | .zebra-list {margin:0 0 18px 0; padding:0;} 51 | .zebra-list li {border:1px solid #DDD; padding:8px; border-bottom:none;} 52 | .zebra-list li:nth-child(odd) {background-color:#F9F9F9;} 53 | .zebra-list li:first-child {-webkit-border-radius:4px 4px 0 0; -moz-border-radius:4px 4px 0 0; border-radius:4px 4px 0 0;} 54 | .zebra-list li:last-child {border-bottom:1px solid #DDD; -webkit-border-radius:0 0 4px 4px; -moz-border-radius:0 0 4px 4px; border-radius:0 0 4px 4px;} -------------------------------------------------------------------------------- /demo/js/site.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jQuery.ScrollTo - Easy element scrolling using jQuery. 3 | * Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com 4 | * Dual licensed under MIT and GPL. 5 | * Date: 5/25/2009 6 | * @author Ariel Flesler 7 | * @version 1.4.2 8 | * 9 | * http://flesler.blogspot.com/2007/10/jqueryscrollto.html 10 | */ 11 | ;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); 12 | 13 | 14 | (function($){ 15 | 16 | $(function() { 17 | 18 | /* toggle links */ 19 | $('.toggle-link').click(function(e) { 20 | 21 | var target = $($(this).attr('href')).toggleClass('hidden'); 22 | 23 | $.scrollTo(target); 24 | 25 | e.preventDefault(); 26 | 27 | }); 28 | 29 | }); 30 | 31 | })(this.jQuery); -------------------------------------------------------------------------------- /jquery-validation/jquery.metadata.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Metadata - jQuery plugin for parsing metadata from elements 3 | * 4 | * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan 5 | * 6 | * Dual licensed under the MIT and GPL licenses: 7 | * http://www.opensource.org/licenses/mit-license.php 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * Revision: $Id: jquery.metadata.js 4187 2007-12-16 17:15:27Z joern.zaefferer $ 11 | * 12 | */ 13 | 14 | /** 15 | * Sets the type of metadata to use. Metadata is encoded in JSON, and each property 16 | * in the JSON will become a property of the element itself. 17 | * 18 | * There are three supported types of metadata storage: 19 | * 20 | * attr: Inside an attribute. The name parameter indicates *which* attribute. 21 | * 22 | * class: Inside the class attribute, wrapped in curly braces: { } 23 | * 24 | * elem: Inside a child element (e.g. a script tag). The 25 | * name parameter indicates *which* element. 26 | * 27 | * The metadata for an element is loaded the first time the element is accessed via jQuery. 28 | * 29 | * As a result, you can define the metadata type, use $(expr) to load the metadata into the elements 30 | * matched by expr, then redefine the metadata type and run another $(expr) for other elements. 31 | * 32 | * @name $.metadata.setType 33 | * 34 | * @example

This is a p

35 | * @before $.metadata.setType("class") 36 | * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" 37 | * @desc Reads metadata from the class attribute 38 | * 39 | * @example

This is a p

40 | * @before $.metadata.setType("attr", "data") 41 | * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" 42 | * @desc Reads metadata from a "data" attribute 43 | * 44 | * @example

This is a p

45 | * @before $.metadata.setType("elem", "script") 46 | * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" 47 | * @desc Reads metadata from a nested script element 48 | * 49 | * @param String type The encoding type 50 | * @param String name The name of the attribute to be used to get metadata (optional) 51 | * @cat Plugins/Metadata 52 | * @descr Sets the type of encoding to be used when loading metadata for the first time 53 | * @type undefined 54 | * @see metadata() 55 | */ 56 | 57 | (function($) { 58 | 59 | $.extend({ 60 | metadata : { 61 | defaults : { 62 | type: 'class', 63 | name: 'metadata', 64 | cre: /({.*})/, 65 | single: 'metadata' 66 | }, 67 | setType: function( type, name ){ 68 | this.defaults.type = type; 69 | this.defaults.name = name; 70 | }, 71 | get: function( elem, opts ){ 72 | var settings = $.extend({},this.defaults,opts); 73 | // check for empty string in single property 74 | if ( !settings.single.length ) settings.single = 'metadata'; 75 | 76 | var data = $.data(elem, settings.single); 77 | // returned cached data if it already exists 78 | if ( data ) return data; 79 | 80 | data = "{}"; 81 | 82 | if ( settings.type == "class" ) { 83 | var m = settings.cre.exec( elem.className ); 84 | if ( m ) 85 | data = m[1]; 86 | } else if ( settings.type == "elem" ) { 87 | if( !elem.getElementsByTagName ) 88 | return undefined; 89 | var e = elem.getElementsByTagName(settings.name); 90 | if ( e.length ) 91 | data = $.trim(e[0].innerHTML); 92 | } else if ( elem.getAttribute != undefined ) { 93 | var attr = elem.getAttribute( settings.name ); 94 | if ( attr ) 95 | data = attr; 96 | } 97 | 98 | if ( data.indexOf( '{' ) <0 ) 99 | data = "{" + data + "}"; 100 | 101 | data = eval("(" + data + ")"); 102 | 103 | $.data( elem, settings.single, data ); 104 | return data; 105 | } 106 | } 107 | }); 108 | 109 | /** 110 | * Returns the metadata object for the first member of the jQuery object. 111 | * 112 | * @name metadata 113 | * @descr Returns element's metadata object 114 | * @param Object opts An object contianing settings to override the defaults 115 | * @type jQuery 116 | * @cat Plugins/Metadata 117 | */ 118 | $.fn.metadata = function( opts ){ 119 | return $.metadata.get( this[0], opts ); 120 | }; 121 | 122 | })(jQuery); -------------------------------------------------------------------------------- /demo/blank.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Projects - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Blank Slate 128 |

129 |
130 |

You have not created any projects yet.

131 | Create you first project 132 |
133 |
134 |
135 |
136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /demo/files.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Files - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Files 128 |

129 | 140 | New File 141 | 161 |
162 |
163 |
164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /demo/profile.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Profile - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Edit Your Profile 128 |

129 |
130 |
131 | Your Profile 132 |
133 | 134 |
135 | 136 |
137 |
138 |
139 | 140 |
141 | 142 |
143 |
144 |
145 | 146 |
147 | 148 |
149 |
150 |
151 | 152 |
153 | 154 |
155 |
156 |
157 | 158 |
159 | 160 |
161 |
162 |
163 | 164 |
165 | 166 |
167 |
168 |
169 | 170 |
171 |
172 |
173 |
174 |
175 |
176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /demo/settings.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Settings - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Settings 128 |

129 |
130 |
131 | Configure Your Settings 132 |
133 | 134 |
135 | 139 | 143 | 147 |

Shows pop-up notifications of new items.

148 |
149 |
150 |
151 | 152 |
153 | 154 |

Leave blank to use your profile email address.

155 |
156 |
157 |
158 | 159 |
160 | 164 | 168 | 172 |

Note: Super Admins get access to all projects.

173 |
174 |
175 |
176 | 177 |
178 |
179 |
180 |
181 |
182 |
183 | 184 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /demo/tasks.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Tasks - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Tasks 128 |

129 |
    130 |
  • 131 | Thank Bill for loaning his tools last weekend Created 1 week ago by Jill 132 |
  • 133 |
  • 134 | Pay internet bill Created 1 week ago by Jill 135 |
  • 136 |
  • 137 | Finish reading Game of Thrones Created 1 week ago by Jill 138 |
  • 139 |
  • 140 | Buy sunscreen for the next summer day trip Created 1 week ago by Jill 141 |
  • 142 |
  • 143 | Send a birthday card to Frankie Created 1 week ago by Jill 144 |
  • 145 |
146 | New Task 147 | 161 |

162 | Completed Tasks 163 |

164 |
    165 |
  • 166 | Wash the Car Completed 2 days ago by John 167 |
  • 168 |
  • 169 | Call the plumber Completed 5 days ago by John 170 |
  • 171 |
  • 172 | Try that new cookie recipe Completed 2 weeks ago by Jill 173 |
  • 174 |
175 |
176 |
177 |
178 | 179 | 180 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /demo/help.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Help - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Help 128 |

129 |
130 |

131 | Help 132 |

133 |

134 | Find all our help and tours below. 135 |

136 |
137 |
138 | 143 |
144 |
145 | 150 |
151 |
152 | 157 |
158 |
159 |
160 | 161 |

162 | Recently Added Help 163 |

164 | 165 | 166 | 167 | 170 | 173 | 176 | 177 | 178 | 179 | 180 | 183 | 186 | 189 | 190 | 191 | 194 | 197 | 200 | 201 | 202 | 205 | 208 | 211 | 212 | 213 | 216 | 219 | 222 | 223 | 224 | 227 | 230 | 233 | 234 | 235 | 238 | 241 | 244 | 245 | 246 |
168 | Name 169 | 171 | Date 172 | 174 | View 175 |
181 | Dashboard 182 | 184 | 4 days ago 185 | 187 | View 188 |
192 | Tasks 193 | 195 | 5 days ago 196 | 198 | View 199 |
203 | Activity 204 | 206 | 5 days ago 207 | 209 | View 210 |
214 | Introduction Tour 215 | 217 | 6 days ago 218 | 220 | View 221 |
225 | Project Organisation 226 | 228 | 9 days ago 229 | 231 | View 232 |
236 | How to upload multiple files 237 | 239 | 16 days ago 240 | 242 | View 243 |
247 |
248 |
249 |
250 | 251 | 252 | 253 | 254 | -------------------------------------------------------------------------------- /demo/help-inner.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Help - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Creating a new Project 128 |

129 | 140 |
141 |
142 |

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis.

143 |

Header Level 2

144 |
    145 |
  1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  2. 146 |
  3. Aliquam tincidunt mauris eu risus.
  4. 147 |
148 |

Sample Graphic

149 |

Header Level 3

150 |

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.

151 |
    152 |
  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  • 153 |
  • Aliquam tincidunt mauris eu risus.
  • 154 |
155 |

Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus

156 |
157 |
158 | 175 | 176 | 177 |
178 |
179 |
180 |
181 |
182 | 183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /demo/projects.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Projects - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Projects 128 |

129 | 130 | 131 | 132 | 135 | 138 | 141 | 144 | 147 | 150 | 151 | 152 | 153 | 154 | 157 | 160 | 163 | 166 | 169 | 174 | 175 | 176 | 179 | 182 | 185 | 188 | 191 | 196 | 197 | 198 | 201 | 204 | 207 | 210 | 213 | 218 | 219 | 220 |
133 | Name 134 | 136 | Client 137 | 139 | Tasks 140 | 142 | Messages 143 | 145 | Files 146 | 148 | Progress 149 |
155 | Nike.com Redesign 156 | 158 | Monsters Inc 159 | 161 | 11 162 | 164 | 2 165 | 167 | 4 168 | 170 |
171 |
172 |
173 |
177 | Twitter Server Consulting 178 | 180 | Bad Robot 181 | 183 | 7 184 | 186 | 3 187 | 189 | 0 190 | 192 |
193 |
194 |
195 |
199 | Childrens Book Illustration 200 | 202 | Evil Genius 203 | 205 | 10 206 | 208 | 2 209 | 211 | 1 212 | 214 |
215 |
216 |
217 |
221 | New Project 222 | 248 |
249 |
250 |
251 | 252 | 253 | 254 | 255 | 256 | -------------------------------------------------------------------------------- /demo/activity.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Activity - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Activity 128 |

129 | 130 | 131 | 132 | 135 | 138 | 141 | 144 | 147 | 148 | 149 | 150 | 151 | 154 | 157 | 160 | 163 | 166 | 167 | 168 | 171 | 174 | 177 | 180 | 183 | 184 | 185 | 188 | 191 | 194 | 197 | 200 | 201 | 202 | 205 | 208 | 211 | 214 | 217 | 218 | 219 | 222 | 225 | 228 | 231 | 234 | 235 | 236 | 239 | 242 | 245 | 248 | 251 | 252 | 253 | 256 | 259 | 262 | 265 | 268 | 269 | 270 | 273 | 276 | 279 | 282 | 285 | 286 | 287 |
133 | Project 134 | 136 | Client 137 | 139 | Type 140 | 142 | Date 143 | 145 | View 146 |
152 | Nike.com Redesign 153 | 155 | Monsters Inc 156 | 158 | New Task 159 | 161 | 4 days ago 162 | 164 | View 165 |
169 | Nike.com Redesign 170 | 172 | Monsters Inc 173 | 175 | New Message 176 | 178 | 5 days ago 179 | 181 | View 182 |
186 | Nike.com Redesign 187 | 189 | Monsters Inc 190 | 192 | New Project 193 | 195 | 5 days ago 196 | 198 | View 199 |
203 | Twitter Server Consulting 204 | 206 | Bad Robot 207 | 209 | New Task 210 | 212 | 6 days ago 213 | 215 | View 216 |
220 | Childrens Book Illustration 221 | 223 | Evil Genius 224 | 226 | New Message 227 | 229 | 9 days ago 230 | 232 | View 233 |
237 | Twitter Server Consulting 238 | 240 | Bad Robot 241 | 243 | New Task 244 | 246 | 16 days ago 247 | 249 | View 250 |
254 | Twitter Server Consulting 255 | 257 | Bad Robot 258 | 260 | New Project 261 | 263 | 16 days ago 264 | 266 | View 267 |
271 | Twitter Server Proposal 272 | 274 | Bad Robot 275 | 277 | Completed Project 278 | 280 | 20 days ago 281 | 283 | View 284 |
288 | 310 |
311 |
312 |
313 | 314 | 315 | 316 | 317 | 318 | -------------------------------------------------------------------------------- /demo/messages.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Messages - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Messages 128 |

129 |

130 |

131 |
    132 |
  • 133 |

    134 | Ut fermentum tortor at enim blandit gravida et et odio. Quisque eu libero vitae nibh malesuada sagittis. Integer eget turpis velit. Maecenas auctor eleifend ante in dictum. Proin mattis dictum imperdiet. Nam sed leo ut massa volutpat pharetra eget vel nisi. Vestibulum vel nunc felis, in ultrices neque. Duis ut rutrum lectus. Vivamus ultricies aliquam est ac gravida. Nulla facilisis sem sed est sagittis sed auctor turpis mollis. Duis ultricies viverra dapibus. Nunc lectus quam, rutrum aliquet cursus vitae, gravida vel arcu. 135 |

    136 | Written 2 weeks ago by Jill 137 |
  • 138 |
  • 139 |

    140 | Donec id consequat odio. Etiam felis tellus, pretium tincidunt malesuada quis, vestibulum a leo. Cras tortor enim, elementum nec pretium non, vestibulum sit amet massa. Vivamus non velit quis purus luctus pretium et ut quam. Aenean eu urna nulla, quis iaculis nunc. Nam consectetur erat nec turpis dapibus ac sodales dolor pulvinar. Fusce eu consectetur risus. In ut erat sit amet nunc tempor mattis sit amet id diam. 141 |

    142 | Written 1 week ago by John 143 |
  • 144 |
  • 145 |

    146 | Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus enim nibh, congue nec tincidunt sed, luctus ullamcorper leo. Nunc ac mauris augue. Nam non nulla tellus, vitae volutpat nibh. Maecenas fringilla vestibulum neque vitae tristique. Ut fermentum accumsan dolor, ut tincidunt lacus dictum non. Proin non ultrices libero. Praesent hendrerit, dolor ut facilisis porta, lorem massa ullamcorper dolor, at dictum elit augue vel lorem. Pellentesque vitae elit quis erat congue gravida ac sed urna. Vivamus vitae purus lectus. Maecenas nec dui lorem. Mauris viverra, est et mattis malesuada, sapien lectus congue justo, eget ultricies lorem ante a nulla. In facilisis nisi in dolor ultricies id hendrerit tortor suscipit. 147 |

    148 | Written 4 days ago by Jill 149 |
      150 |
    • 151 |

      152 | Nascetur ridiculus mus. Phasellus enim nibh, congue nec tincidunt sed, luctus ullamcorper leo. Nunc ac mauris augue. Nam non nulla tellus, vitae volutpat nibh. Maecenas fringilla vestibulum neque vitae tristique. Ut fermentum accumsan dolor, ut tincidunt lacus dictum non. Proin non ultrices libero. Praesent hendrerit, dolor ut facilisis porta, lorem massa ullamcorper dolor, at dictum elit augue vel lorem. Pellentesque vitae elit quis erat congue gravida ac sed urna. Vivamus vitae purus lectus. Maecenas nec dui lorem. Mauris viverra, est et mattis malesuada, sapien lectus congue justo, eget ultricies lorem ante a nulla. 153 |

      154 | Written 2 days ago by Jill 155 |
        156 |
      • 157 |

        158 | Etiam felis tellus. 159 |

        160 | Written 1 day ago by Jill 161 |
      • 162 |
      163 |
    • 164 |
    • 165 |

      166 | Sapien lectus congue justo, eget ultricies lorem ante a nulla. 167 |

      168 | Written 1 day ago by Jill 169 |
    • 170 |
    171 |
  • 172 |
173 | Reply 174 | 188 |
189 |
190 |
191 | 192 | 193 | 194 | 195 | 196 | -------------------------------------------------------------------------------- /demo/gallery.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Files - Akira 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 74 |
75 |
76 |
77 | 123 |
124 |
125 |
126 |

127 | Gallery 128 |

129 | 161 |

Gallery with Captions

162 |
    163 |
  • 164 |
    165 | 166 |
    167 |
    Thumbnail label
    168 |

    Thumbnail caption right here...

    169 |
    170 |
    171 |
  • 172 |
  • 173 |
    174 | 175 |
    176 |
    Thumbnail label
    177 |

    Thumbnail caption right here...

    178 |
    179 |
    180 |
  • 181 |
  • 182 |
    183 | 184 |
    185 |
    Thumbnail label
    186 |

    Thumbnail caption right here...

    187 |
    188 |
    189 |
  • 190 |
  • 191 |
    192 | 193 |
    194 |
    Thumbnail label
    195 |

    Thumbnail caption right here...

    196 |
    197 |
    198 |
  • 199 |
  • 200 |
    201 | 202 |
    203 |
    Thumbnail label
    204 |

    Thumbnail caption right here...

    205 |
    206 |
    207 |
  • 208 |
  • 209 |
    210 | 211 |
    212 |
    Thumbnail label
    213 |

    Thumbnail caption right here...

    214 |
    215 |
    216 |
  • 217 |
218 |

Gallery with Feature Graphic

219 | 266 | 267 |
268 |
269 |
270 | 271 | 272 | 273 | 274 | 275 | -------------------------------------------------------------------------------- /demo/js/prettify.js: -------------------------------------------------------------------------------- 1 | var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; 2 | (function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= 3 | [],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), 9 | l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, 10 | q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, 11 | q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, 12 | "");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), 13 | a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} 14 | for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], 18 | "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], 19 | H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], 20 | J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ 21 | I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), 22 | ["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", 23 | /^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), 24 | ["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", 25 | hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= 26 | !k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}pli{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} 10 | -------------------------------------------------------------------------------- /jquery-validation/jquery.validate.methods.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | 3 | function stripHtml(value) { 4 | // remove html tags and space chars 5 | return value.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' ') 6 | // remove numbers and punctuation 7 | .replace(/[0-9.(),;:!?%#$'"_+=\/-]*/g, ''); 8 | } 9 | jQuery.validator.addMethod("maxWords", function(value, element, params) { 10 | return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length < params; 11 | }, jQuery.validator.format("Please enter {0} words or less.")); 12 | 13 | jQuery.validator.addMethod("minWords", function(value, element, params) { 14 | return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params; 15 | }, jQuery.validator.format("Please enter at least {0} words.")); 16 | 17 | jQuery.validator.addMethod("rangeWords", function(value, element, params) { 18 | return this.optional(element) || stripHtml(value).match(/\b\w+\b/g).length >= params[0] && value.match(/bw+b/g).length < params[1]; 19 | }, jQuery.validator.format("Please enter between {0} and {1} words.")); 20 | 21 | })(); 22 | 23 | jQuery.validator.addMethod("letterswithbasicpunc", function(value, element) { 24 | return this.optional(element) || /^[a-z-.,()'\"\s]+$/i.test(value); 25 | }, "Letters or punctuation only please"); 26 | 27 | jQuery.validator.addMethod("alphanumeric", function(value, element) { 28 | return this.optional(element) || /^\w+$/i.test(value); 29 | }, "Letters, numbers, spaces or underscores only please"); 30 | 31 | jQuery.validator.addMethod("lettersonly", function(value, element) { 32 | return this.optional(element) || /^[a-z]+$/i.test(value); 33 | }, "Letters only please"); 34 | 35 | jQuery.validator.addMethod("nowhitespace", function(value, element) { 36 | return this.optional(element) || /^\S+$/i.test(value); 37 | }, "No white space please"); 38 | 39 | jQuery.validator.addMethod("ziprange", function(value, element) { 40 | return this.optional(element) || /^90[2-5]\d\{2}-\d{4}$/.test(value); 41 | }, "Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx"); 42 | 43 | jQuery.validator.addMethod("integer", function(value, element) { 44 | return this.optional(element) || /^-?\d+$/.test(value); 45 | }, "A positive or negative non-decimal number please"); 46 | 47 | // 正数验证 48 | jQuery.validator.addMethod("positive", function(value, element) { 49 | if (value > 0) { 50 | return true; 51 | } else { 52 | return false; 53 | } 54 | }, "请输入合法的正数!"); 55 | 56 | // 正整数验证 57 | jQuery.validator.addMethod("positiveInteger", function(value, element) { 58 | var tel = /^[1-9]\d*$/; 59 | return this.optional(element) || (tel.test(value)); 60 | }, "请输入合法的正整数!"); 61 | 62 | // 手机号码验证 63 | jQuery.validator.addMethod("mobile", function(value, element) { 64 | var length = value.length; 65 | return this.optional(element) || (/^[1][0-9]{10}$/.test(value)); 66 | }, "手机号码格式错误,请重新输入!"); 67 | 68 | // 电话号码验证 69 | jQuery.validator.addMethod("phone", function(value, element) { 70 | var phone = /((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/; 71 | return this.optional(element) || (phone.test(value)); 72 | }, "电话号码格式错误,请重新输入!"); 73 | 74 | // 邮政编码验证 75 | jQuery.validator.addMethod("zipCode", function(value, element) { 76 | var zip = /^[0-9]{6}$/; 77 | return this.optional(element) || (zip.test(value)); 78 | }, "邮政编码格式错误,请重新输入!"); 79 | 80 | // 若指定元素为不为空则此元素也为必填 81 | jQuery.validator.addMethod("requiredTo", function(value, element, param) { 82 | var requiredTo = $(param).val(); 83 | if (requiredTo != "") { 84 | return value != ""; 85 | } else { 86 | return true; 87 | } 88 | }, "此内容为必填项,请输入!"); 89 | 90 | // 指定元素与此元素必须填写其中一项 91 | jQuery.validator.addMethod("requiredOne", function(value, element, param) { 92 | var requiredOne = $(param).val(); 93 | if (requiredOne == "") { 94 | return value != ""; 95 | } else { 96 | return true; 97 | } 98 | }, $.validator.format("两项必须填写一项!")); 99 | 100 | // 用户名字符串验证 101 | jQuery.validator.addMethod("username", function(value, element) { 102 | return this.optional(element) || /^[\u0391-\uFFE5\w]+$/.test(value); 103 | }, "只允许包含中文、英文、数字和下划线!"); 104 | 105 | // 字符串前缀验证 106 | jQuery.validator.addMethod("prefix", function(value, element, param) { 107 | var prefix = new RegExp("^" + param); 108 | return this.optional(element) || (prefix.test(value)); 109 | }, $.validator.format("请输入以 {0} 开头的字符串!")); 110 | 111 | // 验证值不允许与特定值等于 112 | jQuery.validator.addMethod("notEqual", function(value, element, param) { 113 | return value != param; 114 | }, $.validator.format("请输入值不允许为{0}!")); 115 | // 身份证号码验证 116 | jQuery.validator.addMethod("idCard", function(value, element) { 117 | return this.optional(element) || /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$/.test(value) || /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[A-Z])$/.test(value); 118 | }, "请输入您的身份证号码"); 119 | //日期比较 120 | //使用方法 class="{required:true,dateISO:true,compareDate:'#StartDate'}" 121 | jQuery.validator.addMethod("idCard", function(value, element, param) { 122 | var startDate = $(param).val(); 123 | var date1 = Date.parse(startDate); 124 | var date2 = Date.parse(value); 125 | return date1 < date2; 126 | }, "结束日期必须大于开始日期!"); 127 | /** 128 | * Return true, if the value is a valid vehicle identification number (VIN). 129 | * 130 | * Works with all kind of text inputs. 131 | * 132 | * @example 133 | * @desc Declares a required input element whose value must be a valid vehicle identification number. 134 | * 135 | * @name jQuery.validator.methods.vinUS 136 | * @type Boolean 137 | * @cat Plugins/Validate/Methods 138 | */ 139 | jQuery.validator.addMethod( 140 | "vinUS", 141 | function(v) { 142 | if (v.length != 17) 143 | return false; 144 | var i, n, d, f, cd, cdv; 145 | var LL = ["A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "P", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]; 146 | var VL = [1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 7, 9, 2, 3, 4, 5, 6, 7, 8, 9]; 147 | var FL = [8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2]; 148 | var rs = 0; 149 | for (i = 0; i < 17; i++) { 150 | f = FL[i]; 151 | d = v.slice(i, i + 1); 152 | if (i == 8) { 153 | cdv = d; 154 | } 155 | if (!isNaN(d)) { 156 | d *= f; 157 | } 158 | else { 159 | for (n = 0; n < LL.length; n++) { 160 | if (d.toUpperCase() === LL[n]) { 161 | d = VL[n]; 162 | d *= f; 163 | if (isNaN(cdv) && n == 8) { 164 | cdv = LL[n]; 165 | } 166 | break; 167 | } 168 | } 169 | } 170 | rs += d; 171 | } 172 | cd = rs % 11; 173 | if (cd == 10) { 174 | cd = "X"; 175 | } 176 | if (cd == cdv) { 177 | return true; 178 | } 179 | return false; 180 | }, 181 | "The specified vehicle identification number (VIN) is invalid." 182 | ); 183 | 184 | /** 185 | * Return true, if the value is a valid date, also making this formal check dd/mm/yyyy. 186 | * 187 | * @example jQuery.validator.methods.date("01/01/1900") 188 | * @result true 189 | * 190 | * @example jQuery.validator.methods.date("01/13/1990") 191 | * @result false 192 | * 193 | * @example jQuery.validator.methods.date("01.01.1900") 194 | * @result false 195 | * 196 | * @example 197 | * @desc Declares an optional input element whose value must be a valid date. 198 | * 199 | * @name jQuery.validator.methods.dateITA 200 | * @type Boolean 201 | * @cat Plugins/Validate/Methods 202 | */ 203 | jQuery.validator.addMethod( 204 | "dateITA", 205 | function(value, element) { 206 | var check = false; 207 | var re = /^\d{1,2}\/\d{1,2}\/\d{4}$/; 208 | if (re.test(value)) { 209 | var adata = value.split('/'); 210 | var gg = parseInt(adata[0], 10); 211 | var mm = parseInt(adata[1], 10); 212 | var aaaa = parseInt(adata[2], 10); 213 | var xdata = new Date(aaaa, mm - 1, gg); 214 | if ((xdata.getFullYear() == aaaa) && (xdata.getMonth() == mm - 1) && (xdata.getDate() == gg)) 215 | check = true; 216 | else 217 | check = false; 218 | } else 219 | check = false; 220 | return this.optional(element) || check; 221 | }, 222 | "Please enter a correct date" 223 | ); 224 | 225 | jQuery.validator.addMethod("dateNL", function(value, element) { 226 | return this.optional(element) || /^\d\d?[\.\/-]\d\d?[\.\/-]\d\d\d?\d?$/.test(value); 227 | }, "Vul hier een geldige datum in." 228 | ); 229 | 230 | jQuery.validator.addMethod("time", function(value, element) { 231 | return this.optional(element) || /^([01][0-9])|(2[0123]):([0-5])([0-9])$/.test(value); 232 | }, "Please enter a valid time, between 00:00 and 23:59" 233 | ); 234 | 235 | /** 236 | * matches US phone number format 237 | * 238 | * where the area code may not start with 1 and the prefix may not start with 1 239 | * allows '-' or ' ' as a separator and allows parens around area code 240 | * some people may want to put a '1' in front of their number 241 | * 242 | * 1(212)-999-2345 243 | * or 244 | * 212 999 2344 245 | * or 246 | * 212-999-0983 247 | * 248 | * but not 249 | * 111-123-5434 250 | * and not 251 | * 212 123 4567 252 | */ 253 | jQuery.validator.addMethod("phoneUS", function(phone_number, element) { 254 | phone_number = phone_number.replace(/\s+/g, ""); 255 | return this.optional(element) || phone_number.length > 9 && 256 | phone_number.match(/^(1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/); 257 | }, "Please specify a valid phone number"); 258 | 259 | jQuery.validator.addMethod('phoneUK', function(phone_number, element) { 260 | return this.optional(element) || phone_number.length > 9 && 261 | phone_number.match(/^(\(?(0|\+44)[1-9]{1}\d{1,4}?\)?\s?\d{3,4}\s?\d{3,4})$/); 262 | }, 'Please specify a valid phone number'); 263 | 264 | jQuery.validator.addMethod('mobileUK', function(phone_number, element) { 265 | return this.optional(element) || phone_number.length > 9 && 266 | phone_number.match(/^((0|\+44)7(5|6|7|8|9){1}\d{2}\s?\d{6})$/); 267 | }, 'Please specify a valid mobile number'); 268 | 269 | // TODO check if value starts with <, otherwise don't try stripping anything 270 | jQuery.validator.addMethod("strippedminlength", function(value, element, param) { 271 | return jQuery(value).text().length >= param; 272 | }, jQuery.validator.format("Please enter at least {0} characters")); 273 | 274 | // same as email, but TLD is optional 275 | jQuery.validator.addMethod("email2", function(value, element, param) { 276 | return this.optional(element) || /^((([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])))\.?$/i.test(value); 277 | }, jQuery.validator.messages.email); 278 | 279 | // same as url, but TLD is optional 280 | jQuery.validator.addMethod("url2", function(value, element, param) { 281 | return this.optional(element) || /^(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})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value); 282 | }, jQuery.validator.messages.url); 283 | 284 | // NOTICE: Modified version of Castle.Components.Validator.CreditCardValidator 285 | // Redistributed under the the Apache License 2.0 at http://www.apache.org/licenses/LICENSE-2.0 286 | // Valid Types: mastercard, visa, amex, dinersclub, enroute, discover, jcb, unknown, all (overrides all other settings) 287 | jQuery.validator.addMethod("creditcardtypes", function(value, element, param) { 288 | 289 | if (/[^0-9-]+/.test(value)) 290 | return false; 291 | 292 | value = value.replace(/\D/g, ""); 293 | 294 | var validTypes = 0x0000; 295 | 296 | if (param.mastercard) 297 | validTypes |= 0x0001; 298 | if (param.visa) 299 | validTypes |= 0x0002; 300 | if (param.amex) 301 | validTypes |= 0x0004; 302 | if (param.dinersclub) 303 | validTypes |= 0x0008; 304 | if (param.enroute) 305 | validTypes |= 0x0010; 306 | if (param.discover) 307 | validTypes |= 0x0020; 308 | if (param.jcb) 309 | validTypes |= 0x0040; 310 | if (param.unknown) 311 | validTypes |= 0x0080; 312 | if (param.all) 313 | validTypes = 0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010 | 0x0020 | 0x0040 | 0x0080; 314 | 315 | if (validTypes & 0x0001 && /^(51|52|53|54|55)/.test(value)) { //mastercard 316 | return value.length == 16; 317 | } 318 | if (validTypes & 0x0002 && /^(4)/.test(value)) { //visa 319 | return value.length == 16; 320 | } 321 | if (validTypes & 0x0004 && /^(34|37)/.test(value)) { //amex 322 | return value.length == 15; 323 | } 324 | if (validTypes & 0x0008 && /^(300|301|302|303|304|305|36|38)/.test(value)) { //dinersclub 325 | return value.length == 14; 326 | } 327 | if (validTypes & 0x0010 && /^(2014|2149)/.test(value)) { //enroute 328 | return value.length == 15; 329 | } 330 | if (validTypes & 0x0020 && /^(6011)/.test(value)) { //discover 331 | return value.length == 16; 332 | } 333 | if (validTypes & 0x0040 && /^(3)/.test(value)) { //jcb 334 | return value.length == 16; 335 | } 336 | if (validTypes & 0x0040 && /^(2131|1800)/.test(value)) { //jcb 337 | return value.length == 15; 338 | } 339 | if (validTypes & 0x0080) { //unknown 340 | return true; 341 | } 342 | return false; 343 | }, "Please enter a valid credit card number."); 344 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /demo/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bootstrap.js by @fat & @mdo 3 | * Copyright 2012 Twitter, Inc. 4 | * http://www.apache.org/licenses/LICENSE-2.0.txt 5 | */ 6 | !function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger("close").removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h]();if(e.hasClass("active"))return;return!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('