koda 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/helpers/app_helper.rb +40 -0
- data/lib/helpers/koda_helper.rb +105 -0
- data/lib/helpers/view_helper.rb +146 -0
- data/lib/koda.rb +123 -0
- data/lib/models/hash.rb +29 -0
- data/lib/models/mongo_collection.rb +144 -0
- data/lib/models/mongo_config.rb +22 -0
- data/lib/models/mongo_database.rb +136 -0
- data/lib/models/mongo_document.rb +124 -0
- data/lib/models/mongo_grid.rb +85 -0
- data/lib/models/mongo_media.rb +55 -0
- data/lib/models/user_access_provider.rb +135 -0
- data/lib/models/user_context.rb +19 -0
- data/lib/routes/koda_api.rb +392 -0
- data/lib/routes/koda_site.rb +57 -0
- data/lib/views/console.erb +139 -0
- data/lib/views/explorer.erb +119 -0
- data/lib/views/login.erb +77 -0
- data/lib/views/not_allowed.erb +75 -0
- data/public/koda/Help/DataTypes.txt +82 -0
- data/public/koda/Help/KodaType_Template.js +48 -0
- data/public/koda/apple-touch-icon-114x114-precomposed.png +0 -0
- data/public/koda/apple-touch-icon-144x144-precomposed.png +0 -0
- data/public/koda/apple-touch-icon-57x57-precomposed.png +0 -0
- data/public/koda/apple-touch-icon-72x72-precomposed.png +0 -0
- data/public/koda/apple-touch-icon-precomposed.png +0 -0
- data/public/koda/apple-touch-icon.png +0 -0
- data/public/koda/css/bootstrap-responsive.css +1058 -0
- data/public/koda/css/bootstrap.css +5774 -0
- data/public/koda/css/main.css +288 -0
- data/public/koda/favicon.ico +0 -0
- data/public/koda/fonts/angelina-webfont.eot +0 -0
- data/public/koda/fonts/angelina-webfont.svg +228 -0
- data/public/koda/fonts/angelina-webfont.ttf +0 -0
- data/public/koda/fonts/angelina-webfont.woff +0 -0
- data/public/koda/fonts/coolvetica_rg-webfont.eot +0 -0
- data/public/koda/fonts/coolvetica_rg-webfont.svg +232 -0
- data/public/koda/fonts/coolvetica_rg-webfont.ttf +0 -0
- data/public/koda/fonts/coolvetica_rg-webfont.woff +0 -0
- data/public/koda/fonts/ladyic__-webfont.eot +0 -0
- data/public/koda/fonts/ladyic__-webfont.svg +257 -0
- data/public/koda/fonts/ladyic__-webfont.ttf +0 -0
- data/public/koda/fonts/ladyic__-webfont.woff +0 -0
- data/public/koda/images/ajax-loader.gif +0 -0
- data/public/koda/images/back.png +0 -0
- data/public/koda/images/bg-table-thead.png +0 -0
- data/public/koda/images/big_folder.png +0 -0
- data/public/koda/images/box_file.png +0 -0
- data/public/koda/images/car_add.png +0 -0
- data/public/koda/images/compress.png +0 -0
- data/public/koda/images/database_table.png +0 -0
- data/public/koda/images/feed_add.png +0 -0
- data/public/koda/images/feed_link.png +0 -0
- data/public/koda/images/file.png +0 -0
- data/public/koda/images/folder.png +0 -0
- data/public/koda/images/folder_image.png +0 -0
- data/public/koda/images/glyphicons-halflings-white.png +0 -0
- data/public/koda/images/glyphicons-halflings.png +0 -0
- data/public/koda/images/group_add.png +0 -0
- data/public/koda/images/group_key.png +0 -0
- data/public/koda/images/image_add.png +0 -0
- data/public/koda/images/layout_add.png +0 -0
- data/public/koda/images/package.png +0 -0
- data/public/koda/images/page_white_edit.png +0 -0
- data/public/koda/images/page_white_text.png +0 -0
- data/public/koda/images/photo_add.png +0 -0
- data/public/koda/images/toggle-collapse-dark.png +0 -0
- data/public/koda/images/toggle-collapse-light.png +0 -0
- data/public/koda/images/toggle-expand-dark.png +0 -0
- data/public/koda/images/toggle-expand-light.png +0 -0
- data/public/koda/images/twitter.png +0 -0
- data/public/koda/koda-editors/KodaEditor.js +843 -0
- data/public/koda/koda-editors/collection-editor.html +56 -0
- data/public/koda/koda-editors/generic-editor.css +112 -0
- data/public/koda/koda-editors/generic-editor.html +74 -0
- data/public/koda/koda-editors/koda-editor.css +72 -0
- data/public/koda/koda-editors/twitterfeed-editor.html +90 -0
- data/public/koda/koda-types/_builtin_registration.json +62 -0
- data/public/koda/koda-types/koda-access.json +49 -0
- data/public/koda/koda-types/koda-collection.json +12 -0
- data/public/koda/koda-types/koda-generictext.json +50 -0
- data/public/koda/koda-types/koda-media.json +58 -0
- data/public/koda/koda-types/koda-twitterfeed.json +79 -0
- data/public/koda/koda-types/koda-user.json +71 -0
- data/public/koda/nicEditorIcons.gif +0 -0
- data/public/koda/scripts/Koda.js +1200 -0
- data/public/koda/scripts/lib/DOMAssistant.js +4 -0
- data/public/koda/scripts/lib/modernizr.js +4 -0
- data/public/koda/scripts/lib/respond.js +2 -0
- data/public/koda/scripts/lib/selectivizr.js +5 -0
- data/public/koda/scripts/plugins/bootstrap.js +2027 -0
- data/public/koda/scripts/plugins/box.js +8 -0
- data/public/koda/scripts/plugins/fancybox/blank.gif +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_close.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_loading.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_nav_left.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_nav_right.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_shadow_e.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_shadow_n.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_shadow_ne.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_shadow_nw.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_shadow_s.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_shadow_se.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_shadow_sw.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_shadow_w.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_title_left.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_title_main.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_title_over.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancy_title_right.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancybox-x.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancybox-y.png +0 -0
- data/public/koda/scripts/plugins/fancybox/fancybox.png +0 -0
- data/public/koda/scripts/plugins/fancybox/jquery.easing-1.3.pack.js +72 -0
- data/public/koda/scripts/plugins/fancybox/jquery.fancybox-1.3.4.css +359 -0
- data/public/koda/scripts/plugins/fancybox/jquery.fancybox-1.3.4.js +1155 -0
- data/public/koda/scripts/plugins/fancybox/jquery.fancybox-1.3.4.pack.js +46 -0
- data/public/koda/scripts/plugins/fancybox/jquery.mousewheel-3.0.4.pack.js +14 -0
- data/public/koda/scripts/plugins/fileuploader.js +1527 -0
- data/public/koda/scripts/plugins/jquery-class.js +7 -0
- data/public/koda/scripts/plugins/jquery.contextmenu/images/cut.png +0 -0
- data/public/koda/scripts/plugins/jquery.contextmenu/images/door.png +0 -0
- data/public/koda/scripts/plugins/jquery.contextmenu/images/page_white_copy.png +0 -0
- data/public/koda/scripts/plugins/jquery.contextmenu/images/page_white_delete.png +0 -0
- data/public/koda/scripts/plugins/jquery.contextmenu/images/page_white_edit.png +0 -0
- data/public/koda/scripts/plugins/jquery.contextmenu/images/page_white_paste.png +0 -0
- data/public/koda/scripts/plugins/jquery.contextmenu/jquery.contextMenu.css +63 -0
- data/public/koda/scripts/plugins/jquery.contextmenu/jquery.contextMenu.js +211 -0
- data/public/koda/scripts/plugins/jquery.js +2 -0
- data/public/koda/scripts/plugins/json2.js +277 -0
- data/public/koda/scripts/plugins/modernizr.js +2 -0
- data/public/koda/scripts/plugins/nicEdit.js +183 -0
- data/public/koda/scripts/plugins/qunit.js +1448 -0
- data/public/koda/scripts/plugins/spin.js +2 -0
- data/public/koda/scripts/plugins/uploader/README.md +77 -0
- data/public/koda/scripts/plugins/uploader/README.txt +89 -0
- data/public/koda/scripts/plugins/uploader/example/application.js +20 -0
- data/public/koda/scripts/plugins/uploader/example/index.html +109 -0
- data/public/koda/scripts/plugins/uploader/example/style.css +22 -0
- data/public/koda/scripts/plugins/uploader/example/upload.php +313 -0
- data/public/koda/scripts/plugins/uploader/jquery.fileupload-ui.css +100 -0
- data/public/koda/scripts/plugins/uploader/jquery.fileupload-ui.js +642 -0
- data/public/koda/scripts/plugins/uploader/jquery.fileupload.js +711 -0
- data/public/koda/scripts/plugins/uploader/jquery.iframe-transport.js +133 -0
- data/public/koda/scripts/plugins/uploader/pbar-ani.gif +0 -0
- data/public/koda/scripts/plugins/uploader/tests/index.html +115 -0
- data/public/koda/scripts/plugins/uploader/tests/tests.js +1008 -0
- data/public/koda/scripts/require.js +32 -0
- data/public/koda/scripts/specs.js +12 -0
- data/public/koda/scripts/specs/cd-command-spec.js +51 -0
- data/public/koda/scripts/specs/controller-spec.js +95 -0
- data/public/koda/scripts/specs/doubles/mock-command.js +21 -0
- data/public/koda/scripts/specs/doubles/mock-jamservice.js +33 -0
- data/public/koda/scripts/specs/doubles/mock-prompt.js +30 -0
- data/public/koda/scripts/specs/doubles/uiobject-double.js +15 -0
- data/public/koda/scripts/specs/edit-command-spec.js +76 -0
- data/public/koda/scripts/specs/ls-command-spec.js +61 -0
- data/public/koda/scripts/specs/mkdir-command-spec.js +40 -0
- data/public/koda/scripts/specs/peek-command-spec.js +24 -0
- data/public/koda/scripts/specs/remove-command-spec.js +37 -0
- data/public/koda/scripts/specs/service-spec.js +85 -0
- metadata +402 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Developed by Robert Nyman/DOMAssistant team, code/licensing: http://domassistant.googlecode.com/, documentation: http://www.domassistant.com/documentation, version 2.8
|
|
2
|
+
var DOMAssistant=function(){var j=function(){},o=window,g=o.$,k=o.$$,d=/*@cc_on!@*/false,i=d&&parseFloat(navigator.appVersion)<6,h,c={},q={},a=true,n=Array.prototype.slice,p={accesskey:"accessKey","class":"className",colspan:"colSpan","for":"htmlFor",maxlength:"maxLength",readonly:"readOnly",rowspan:"rowSpan",tabindex:"tabIndex",valign:"vAlign",cellspacing:"cellSpacing",cellpadding:"cellPadding"},m={rules:/\s*,\s*/g,selector:/^(\w+|\*)?(#[\w\u00C0-\uFFFF\-=$]+)?((\.[\w\u00C0-\uFFFF\-]+)*)?((\[\w+\s*([~^$*|])?(=\s*([-\w\u00C0-\uFFFF\s.]+|"[^"]*"|'[^']*'))?\]+)*)?((:\w[-\w]*(\((odd|even|\-?\d*n?([-+]\d+)?|[:#]?[-\w\u00C0-\uFFFF.]+|"[^"]*"|'[^']*'|((\w*\.[-\w\u00C0-\uFFFF]+)*)?|(\[#?\w+([~^$*|])?=?[-\w\u00C0-\uFFFF\s.'"]+\]+)|(:\w[-\w]*\(.+\)))\))?)*)?([+>~])?/,selectorSplit:/(?:\[.*\]|\(.*\)|[^\s+>~[(])+|[+>~]/g,id:/^#([-\w\u00C0-\uFFFF=$]+)$/,tag:/^\w+/,relation:/^[+>~]$/,pseudo:/^:(\w[-\w]*)(\((.+)\))?$/,pseudos:/:(\w[-\w]*)(\((([^(]+)|([^(]+\([^(]+)\))\))?/g,attribs:/\[(\w+)\s*([~^$*|])?(=)?\s*([^\[\]]*|"[^"]*"|'[^']*')?\](?=$|\[|:|\s)/g,classes:/\.([-\w\u00C0-\uFFFF]+)/g,quoted:/^["'](.*)["']$/,nth:/^((odd|even)|([1-9]\d*)|((([1-9]\d*)?)n([-+]\d+)?)|(-(([1-9]\d*)?)n\+(\d+)))$/,special:/(:check|:enabl|\bselect)ed\b/},f=function(t,u,r){var s=t.tagName;while((t=t[u+"Sibling"])&&(t.nodeType!==1||(r?t.tagName!==s:t.tagName==="!"))){}return t},b=function(r){return typeof r!=="undefined"},l=function(r){return(l=r[0].compareDocumentPosition?function(s){return s.sort(function(u,t){return 3-(u.compareDocumentPosition(t)&6)})}:d?function(s){return s.sort(function(u,t){return u.sourceIndex-t.sourceIndex})}:function(s){return s.sort(function(w,u){var v=document.createRange(),t=document.createRange();v.setStart(w,0);v.setEnd(w,0);t.setStart(u,0);t.setEnd(u,0);return v.compareBoundaryPoints(Range.START_TO_END,t)})})(r)};var e=function(s,r){s.push.apply(s,n.apply(r));return s};if(d){e=function(t,s){if(s.slice){return t.concat(s)}var r=0,u;while((u=s[r++])){t[t.length]=u}return t}}return{isIE:d,camel:p,def:b,allMethods:[],publicMethods:["prev","next","hasChild","cssSelect","elmsByClass","elmsByAttribute","elmsByTag"],harmonize:function(){o.$=g;o.$$=k;return this},initCore:function(){this.applyMethod.call(o,"$",this.$);this.applyMethod.call(o,"$$",this.$$);o.DOMAssistant=this;if(d){j=Array}j.prototype=[];(function(r){r.each=function(v,u){for(var t=0,s=this.length;t<s;t++){if(v.call(u||this[t],this[t],t,this)===false){break}}return this};r.first=function(){return b(this[0])?DOMAssistant.addMethodsToElm(this[0]):null};r.end=function(){return this.previousSet};r.indexOf=r.indexOf||function(u){for(var t=0,s=this.length;t<s;t++){if(t in this&&this[t]===u){return t}}return -1};r.map=function(w,v){var u=[];for(var t=0,s=this.length;t<s;t++){if(t in this){u[t]=w.call(v||this[t],this[t],t,this)}}return u};r.filter=function(w,v){var u=new j();u.previousSet=this;for(var t=0,s=this.length;t<s;t++){if(t in this&&w.call(v||this[t],this[t],t,this)){u.push(this[t])}}return u};r.every=function(v,u){for(var t=0,s=this.length;t<s;t++){if(t in this&&!v.call(u||this[t],this[t],t,this)){return false}}return true};r.some=function(v,u){for(var t=0,s=this.length;t<s;t++){if(t in this&&v.call(u||this[t],this[t],t,this)){return true}}return false}})(j.prototype);this.attach(this)},addMethods:function(r,s){if(!b(this.allMethods[r])){this.allMethods[r]=s;this.addHTMLArrayPrototype(r,s)}},addMethodsToElm:function(s){for(var r in this.allMethods){if(b(this.allMethods[r])){this.applyMethod.call(s,r,this.allMethods[r])}}return s},applyMethod:function(s,r){if(typeof this[s]!=="function"){this[s]=r}},attach:function(t){var r=t.publicMethods;if(!b(r)){for(var v in t){if(v!=="init"&&b(t[v])){this.addMethods(v,t[v])}}}else{if(r.constructor===Array){for(var s=0,u;(u=r[s]);s++){this.addMethods(u,t[u])}}}if(typeof t.init==="function"){t.init()}},addHTMLArrayPrototype:function(r,s){j.prototype[r]=function(){var v=new j();v.previousSet=this;for(var u=0,t=this.length;u<t;u++){v.push(s.apply(DOMAssistant.$$(this[u]),arguments))}return v}},cleanUp:function(u){var s=u.all||u.getElementsByTagName("*");for(var r=0,t;(t=s[r++]);){if(t.hasData&&t.hasData()){if(t.removeEvent){t.removeEvent()}t.unstore()}}u.innerHTML=""},setCache:function(r){a=r},$:function(){var u=arguments[0];if(arguments.length===1&&(typeof u==="object"||(typeof u==="function"&&!!u.nodeName))){return DOMAssistant.$$(u)}var w=!!u?new j():null;for(var s=0,r,v;(r=arguments[s]);s++){if(typeof r==="string"){r=r.replace(/^[^#\(]*(#)/,"$1");if(m.id.test(r)){if((v=DOMAssistant.$$(r.substr(1),false))){w.push(v)}}else{var t=(document.all||document.getElementsByTagName("*")).length;w=(!document.querySelectorAll&&a&&q.rule&&q.rule===r&&q.doc===t)?q.elms:e(w,DOMAssistant.cssSelection.call(document,r));q={rule:r,elms:w,doc:t}}}}return w},$$:function(x,u){var w=(typeof x==="object"||typeof x==="function"&&!!x.nodeName)?x:document.getElementById(x),v=b(u)?u:true,t=function(z){var y=z.id;return typeof y!=="object"?y:z.attributes.id.nodeValue};if(typeof x==="string"&&w&&t(w)!==x){w=null;for(var r=0,s;(s=document.all[r]);r++){if(t(s)===x){w=s;break}}}if(w&&v&&!w.next){DOMAssistant.addMethodsToElm(w)}return w},prev:function(){return DOMAssistant.$$(f(this,"previous"))},next:function(){return DOMAssistant.$$(f(this,"next"))},hasChild:function(r){return this===document||this!==r&&(this.contains?this.contains(r):!!(this.compareDocumentPosition(r)&16))},getSequence:function(v){var w,u=2,s=-1,r=-1,t=m.nth.exec(v.replace(/^0n\+/,"").replace(/^2n$/,"even").replace(/^2n+1$/,"odd"));if(!t){return null}if(t[2]){w=(t[2]==="odd")?1:2;r=(w===1)?1:0}else{if(t[3]){w=s=parseInt(t[3],10);u=0}else{if(t[4]){u=t[6]?parseInt(t[6],10):1;w=t[7]?parseInt(t[7],10):0;while(w<1){w+=u}r=(w>=u)?(w-u)%u:w}else{if(t[8]){u=t[10]?parseInt(t[10],10):1;w=s=parseInt(t[11],10);while(w>u){w-=u}r=(s>=u)?(s-u)%u:s}}}}return{start:w,add:u,max:s,modVal:r}},cssByDOM:function(v){var aU,I,D,N,av,x,ah,A,K,w,aq,aN,y,aI,at,aB=new j(),aR=aB.indexOf,ap=[],aG=[],aK=v.replace(m.rules,",").split(","),aF={};function aQ(s){s=s||ap;for(var r=s.length;r--;){s[r].added=null;s[r].removeAttribute("added")}}function C(){for(var r=aU.length;r--;){aU[r].childElms=null}}function am(t,r){for(var u=0,aX;(aX=t[u]);u++){var aW=false;for(var s=0,aV;(aV=r[s]);s++){if(aV===aX){aW=true;r.splice(s,1);break}}if(aW){t.splice(u--,1)}}return t}function E(s,r){return(d||m.special.test(r))?s[p[r.toLowerCase()]||r]:s.getAttribute(r,2)}function P(r,s){r=r?r.replace(m.quoted,"$1").replace(/(\.|\[|\])/g,"\\$1"):null;return{"^":"^"+r,"$":r+"$","*":r,"|":"^"+r+"(\\-\\w+)*$","~":"\\b"+r+"\\b"}[s]||(r!==null?"^"+r+"$":r)}function W(r){return(r||this).tagName!=="!"}function S(r,s){return i?(r==="*"?s.all:s.all.tags(r)):s.getElementsByTagName(r)}function aL(r,s){r=r||"*";s=s||document;return(s===document||s.lastModified)?c[r]||(c[r]=S(r,document)):S(r,s)}function ar(aX,bf,u){aU=[];var aV=bf.split("-"),a0=[],a5=0,be=/\-of\-type$/.test(bf),a4,aZ={first:function(bg){return !f(bg,"previous",be)},last:function(bg){return !f(bg,"next",be)},empty:function(bg){return !bg.firstChild},enabled:function(bg){return !bg.disabled&&bg.type!=="hidden"},disabled:function(bg){return bg.disabled},checked:function(bg){return bg.checked},contains:function(bg){return(bg.innerText||bg.textContent||"").indexOf(u.replace(m.quoted,"$1"))>-1},other:function(bg){return E(bg,bf)===u}};function t(bg){while((A=aX[a5++])){if(W(A)&&aZ[bg](A)){a0[a0.length]=A}}return a0}var bb=aV[0]||null;if(bb&&aZ[bb]){return t(bb)}switch(bb){case"only":var a1,aW;while((A=aX[a5++])){K=A.parentNode;var a6=A.nodeName;if(K!==a1||a6!==aW){if(aZ.first(A)&&aZ.last(A)){a0[a0.length]=A}a1=K;aW=a6}}break;case"nth":if(u==="n"){a0=aX}else{var bd=(aV[1]==="last")?["lastChild","previousSibling"]:["firstChild","nextSibling"];aI=DOMAssistant.getSequence(u);if(aI){while((A=aX[a5++])){K=A.parentNode;K.childElms=K.childElms||{};var a7=A.nodeName;if(!K.childElms[a7]){var ba=0;aN=aI.start;y=K[bd[0]];while(y&&(aI.max<0||aN<=aI.max)){var bc=y.nodeName;if((be&&bc===a7)||(!be&&y.nodeType===1&&bc!=="!")){if(++ba===aN){if(bc===a7){a0[a0.length]=y}aN+=aI.add}}y=y[bd[1]]}if(at){h++}K.childElms[a7]=true;aU[aU.length]=K}}C()}}break;case"target":var s=document.location.hash.slice(1);if(s){while((A=aX[a5++])){if(E(A,"name")===s||E(A,"id")===s){a0[a0.length]=A;break}}}break;case"not":if((a4=m.pseudo.exec(u))){a0=am(aX,ar(aX,a4[1]?a4[1].toLowerCase():null,a4[3]||null))}else{for(var a8 in m){if(m[a8].lastIndex){m[a8].lastIndex=0}}u=u.replace(m.id,"[id=$1]");var a3=m.tag.exec(u);var aY=m.classes.exec(u);var a2=m.attribs.exec(u);var r=new RegExp(a2?P(a2[4],a2[2]):"(^|\\s)"+(a3?a3[0]:aY?aY[1]:"")+"(\\s|$)","i");while((w=aX[a5++])){aq=null;if(a3&&!r.test(w.nodeName)||aY&&!r.test(w.className)){aq=w}else{if(a2){var a9=E(w,a2[1]);if(!b(a9)||a9===false||typeof a9==="string"&&!r.test(a9)){aq=w}}}if(aq&&!aq.added){aq.added=true;a0[a0.length]=aq}}}break;default:return t("other")}return a0}function Z(aV,t){var r=0,u=aV,aW;while((aW=t[r++])){if(!u.length||u.indexOf(aW)<0){aV.push(aW)}}return aV}h=-1;for(var ak=0,aJ=[];(I=aK[ak]);ak++){if(!(D=I.match(m.selectorSplit))||ak&&aR.call(aK.slice(0,ak),I)>-1){continue}ap=[this];for(var ai=0,G;(G=D[ai]);ai++){aG=[];if((N=m.relation.exec(G))){var an=null,aS=D[ai+1];if((av=m.tag.exec(aS))){av=av[0];x=new RegExp("(^|\\s)"+av+"(\\s|$)","i")}else{if(m.id.test(aS)){an=DOMAssistant.$(aS)||null}}for(var ag=0,M;(M=ap[ag]);ag++){switch(N[0]){case">":var aD=an||aL(av,M);for(var ae=0,ay;(ay=aD[ae]);ae++){if(ay.parentNode===M){aG[aG.length]=ay}}break;case"+":if((M=f(M,"next"))){if((an&&an[0]===M)||(!an&&(!av||x.test(M.nodeName)))){aG[aG.length]=M}}break;case"~":while((M=M.nextSibling)&&!M.added){if((an&&an[0]===M)||(!an&&(!av||x.test(M.nodeName)))){M.added=true;aG[aG.length]=M}}break}}ap=aG;aQ();G=D[++ai];if(/^\w+$/.test(G)||m.id.test(G)){continue}ap.skipTag=true}var au=m.selector.exec(G);aF={tag:au[1]?au[1]:"*",id:au[2],allClasses:au[3],allAttr:au[5],allPseudos:au[10]};at=(aF.tag==="*");if(aF.id){var O=0,al=document.getElementById(aF.id.slice(1));if(al){while(ap[O]&&!DOMAssistant.hasChild.call(ap[O],al)){O++}aG=(O<ap.length&&(at||aF.tag===al.tagName.toLowerCase()))?[al]:[]}ap=aG}else{if(aF.tag&&!ap.skipTag){if(ai===0&&!aG.length&&ap.length===1){ap=aG=e([],aL(aF.tag,ap[0]))}else{for(var ad=0,aO=ap.length,az,aw;ad<aO;ad++){az=aL(aF.tag,ap[ad]);for(var aa=0;(aw=az[aa]);aa++){if(!aw.added){aw.added=true;aG[aG.length]=aw}}}ap=aG;aQ()}}}if(!aG.length){break}ap.skipTag=false;if(aF.allClasses){var Y=0,ab=[],J=aF.allClasses.split(".").slice(1);while((ah=ap[Y++])){var af=true,ax=ah.className;if(ax&&ax.length){ax=ax.split(" ");for(var X=J.length;X--;){if(ax.indexOf(J[X])<0){af=false;break}}if(af){ab[ab.length]=ah}}}ap=aG=ab}if(aF.allAttr){var B,T=0,aC=[],ac=[],aH=aF.allAttr.match(m.attribs);for(var H=/^\[(selected|readonly)(\s*=.+)?\]$/,V=0,z=aH.length,U,aP;V<z;V++){m.attribs.lastIndex=0;U=m.attribs.exec(aH[V].replace(H,"[$1]"));aP=P(U[4],U[2]||null);aC[V]=[(aP?new RegExp(aP):null),U[1]]}while((ah=aG[T++])){for(var R=0,aE=aC.length;R<aE;R++){var aA=aC[R][0],aj=E(ah,aC[R][1]);B=true;if(!aA&&aj===true){continue}if((!aA&&(!aj||typeof aj!=="string"||!aj.length))||(!!aA&&!aA.test(aj))){B=false;break}}if(B){ac[ac.length]=ah}}ap=aG=ac}if(aF.allPseudos){var F=aF.allPseudos.match(m.pseudos);for(var Q=0,ao=F.length;Q<ao;Q++){m.pseudos.lastIndex=0;var aT=m.pseudos.exec(F[Q]);var L=aT[1]?aT[1].toLowerCase():null;var aM=aT[3]||null;aG=ar(aG,L,aM);aQ(aG)}ap=aG}}aB=((aJ.length&&(at||aR.call(aJ,aF.tag)>=0||aR.call(aJ,"*")>=0))?Z:e)(aB,ap);aJ.push(aF.tag);if(d&&at){aB=aB.filter(W)}}return((aB.length>1&&aK.length>1)||h>0)?l(aB):aB},cssByXpath:function(s){var t={xhtml:"http://www.w3.org/1999/xhtml"},u=(document.documentElement.namespaceURI===t.xhtml)?"xhtml:":"",r=function v(w){return t[w]||null};DOMAssistant.cssByXpath=function(N){var R,T,J,z,A,E,B=new j(),C=N.replace(m.rules,",").split(",");function M(W){var X=W?"[":"",V=W?"]":"";return function(Y,ac,ab,aa,Z){Z=(Z||"").replace(m.quoted,"$1");if(ac===Z&&ac==="readonly"){aa=null}return X+({"^":"starts-with(@"+ac+', "'+Z+'")',"$":"substring(@"+ac+", (string-length(@"+ac+") - "+(Z.length-1)+"), "+Z.length+') = "'+Z+'"',"*":'contains(concat(" ", @'+ac+', " "), "'+Z+'")',"|":"@"+ac+'="'+Z+'" or starts-with(@'+ac+', "'+Z+'-")',"~":'contains(concat(" ", @'+ac+', " "), " '+Z+' ")'}[ab]||("@"+ac+(aa?'="'+Z+'"':"")))+V}}function P(W,Y,X){W=/\-child$/.test(Y)?"*":W;var aa=Y.split("-"),V=((aa[1]==="last")?"(count(following-sibling::":"(count(preceding-sibling::")+W+") + 1)",Z,ab;switch(aa[0]){case"nth":return(X!=="n"&&(E=DOMAssistant.getSequence(X)))?((E.start===E.max)?V+" = "+E.start:V+" mod "+E.add+" = "+E.modVal+((E.start>1)?" and "+V+" >= "+E.start:"")+((E.max>0)?" and "+V+" <= "+E.max:"")):"";case"not":return"not("+((Z=m.pseudo.exec(X))?P(W,Z[1]?Z[1].toLowerCase():null,Z[3]||null):X.replace(m.id,"[id=$1]").replace(m.tag,"self::$0").replace(m.classes,'contains(concat(" ", @class, " "), " $1 ")').replace(m.attribs,M()))+")";case"first":return"not(preceding-sibling::"+W+")";case"last":return"not(following-sibling::"+W+")";case"only":return"not(preceding-sibling::"+W+" or following-sibling::"+W+")";case"empty":return"not(child::*) and not(text())";case"contains":return'contains(., "'+X.replace(m.quoted,"$1")+'")';case"enabled":return'not(@disabled) and not(@type="hidden")';case"disabled":return"@disabled";case"target":return'@name="'+(ab=document.location.hash.slice(1))+'" or @id="'+ab+'"';default:return"@"+Y+'="'+X+'"'}}for(var O=0;(R=C[O]);O++){if(!(T=R.match(m.selectorSplit))||O&&B.indexOf.call(C.slice(0,O),R)>-1){continue}J=J?J+" | .":".";for(var L=0,Q=T.length;L<Q;L++){z=m.selector.exec(T[L]);A={tag:u+(z[1]?z[1]:"*"),id:z[2],allClasses:z[3],allAttr:z[5],allPseudos:z[10],tagRelation:z[20]};J+=(A.tagRelation?({">":"/","+":"/following-sibling::*[1]/self::","~":"/following-sibling::"}[A.tagRelation]||""):((L>0&&m.relation.test(T[L-1]))?A.tag:("//"+A.tag)))+(A.id||"").replace(m.id,'[@id = "$1"]')+(A.allClasses||"").replace(m.classes,'[contains(concat(" ", @class, " "), " $1 ")]')+(A.allAttr||"").replace(m.attribs,M(true));if(A.allPseudos){var D=A.allPseudos.match(m.pseudos);for(var K=0,x=D.length;K<x;K++){m.pseudos.lastIndex=0;var y=m.pseudos.exec(D[K]),U=y[1]?y[1].toLowerCase():null,w=y[3]||null,G=P(A.tag,U,w);if(G.length){J+="["+G+"]"}}}}}try{var I=document.evaluate(J,this,r,7,null),H,F=0;while((H=I.snapshotItem(F++))){B.push(H)}}catch(S){}return B};return DOMAssistant.cssByXpath.call(this,s)},cssSelection:function(s){if(!s){return null}var r=m.special.test(s);try{if(document.querySelectorAll&&!r){return e(new j(),this.querySelectorAll(s))}}catch(t){}return((document.evaluate&&!r&&!/-of-type/.test(s))?DOMAssistant.cssByXpath:DOMAssistant.cssByDOM).call(this,s)},cssSelect:function(r){return DOMAssistant.cssSelection.call(this,r)},elmsByClass:function(t,r){var s=(r||"")+"."+t;return DOMAssistant.cssSelection.call(this,s)},elmsByAttribute:function(s,t,r,v){var u=(r||"")+"["+s+((t&&t!=="*")?((v||"")+"="+t+"]"):"]");return DOMAssistant.cssSelection.call(this,u)},elmsByTag:function(r){return DOMAssistant.cssSelection.call(this,r)}}}();DOMAssistant.initCore();DOMAssistant.Storage=function(){var c=1,a=[],b="_da"+ +new Date();return{hasData:function(){var d=this[b];return !!d&&!!a[d]},retrieve:function(d){if(!DOMAssistant.def(d)){return this[b]||(this[b]=c++)}if(!this[b]||!a[this[b]]){return}return a[this[b]][d]},store:function(f,g){var e=this[b]||(this[b]=c++);a[e]=a[e]||{};if(typeof f==="object"){for(var d in f){if(typeof d==="string"){a[e][d]=f[d]}}}else{a[e][f]=g}return this},unstore:function(e){var d=this[b]||(this[b]=c++);if(a[d]){if(DOMAssistant.def(e)){delete a[d][e]}else{a[d]=null}}return this}}}();DOMAssistant.attach(DOMAssistant.Storage);DOMAssistant.AJAX=function(){var globalXMLHttp=null,readyState=0,status=-1,statusText="",requestPool=[],createAjaxObj=function(url,method,callback,addToContent){var params=null;if(/POST/i.test(method)){url=url.split("?");params=url[1];url=url[0]}return{url:url,method:method,callback:callback,params:params,headers:{},responseType:"text",addToContent:addToContent||false}};return{publicMethods:["ajax","get","post","load"],initRequest:function(){var XMLHttp=null;if(!!window.XMLHttpRequest&&!DOMAssistant.isIE){XMLHttp=new XMLHttpRequest();DOMAssistant.AJAX.initRequest=function(){return requestPool.length?requestPool.pop():new XMLHttpRequest()}}else{if(!!window.ActiveXObject){var XMLHttpMS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(var i=0;i<XMLHttpMS.length;i++){try{XMLHttp=new window.ActiveXObject(XMLHttpMS[i]);DOMAssistant.AJAX.initRequest=function(){return requestPool.length?requestPool.pop():new window.ActiveXObject(XMLHttpMS[i])};break}catch(e){XMLHttp=null}}}}return XMLHttp},ajax:function(ajaxObj){if(!ajaxObj.noParse&&ajaxObj.url&&/\?/.test(ajaxObj.url)&&ajaxObj.method&&/POST/i.test(ajaxObj.method)){var url=ajaxObj.url.split("?");ajaxObj.url=url[0];ajaxObj.params=url[1]+((url[1].length>0&&ajaxObj.params)?("&"+ajaxObj.params):"")}return DOMAssistant.AJAX.makeCall.call(this,ajaxObj)},get:function(url,callback,addToContent){return DOMAssistant.AJAX.makeCall.call(this,createAjaxObj(url,"GET",callback,addToContent))},post:function(url,callback){return DOMAssistant.AJAX.makeCall.call(this,createAjaxObj(url,"POST",callback))},load:function(url,addToContent){this.get(url,DOMAssistant.AJAX.replaceWithAJAXContent,addToContent)},makeCall:function(ajaxObj){var XMLHttp=DOMAssistant.AJAX.initRequest();if(XMLHttp){globalXMLHttp=XMLHttp;(function(elm){var url=ajaxObj.url,method=ajaxObj.method||"GET",callback=ajaxObj.callback,params=ajaxObj.params,headers=ajaxObj.headers,responseType=ajaxObj.responseType||"text",addToContent=ajaxObj.addToContent,timeout=ajaxObj.timeout||null,ex=ajaxObj.exception,timeoutId=null,done=false;XMLHttp.open(method,url,true);XMLHttp.setRequestHeader("AJAX","true");XMLHttp.setRequestHeader("X-Requested-With","XMLHttpRequest");if(method==="POST"){XMLHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");XMLHttp.setRequestHeader("Content-length",params?params.length:0);if(XMLHttp.overrideMimeType){XMLHttp.setRequestHeader("Connection","close")}}if(responseType==="json"){XMLHttp.setRequestHeader("Accept","application/json, text/javascript, */*")}for(var i in headers){if(typeof i==="string"){XMLHttp.setRequestHeader(i,headers[i])}}if(typeof callback==="function"){XMLHttp.onreadystatechange=function(){try{if(XMLHttp.readyState===4&&!done){window.clearTimeout(timeoutId);done=true;status=XMLHttp.status;statusText=XMLHttp.statusText;readyState=4;if((status||location.protocol!=="file:")&&(status<200||status>=300)){throw new Error(statusText)}var response=/xml/i.test(responseType)?XMLHttp.responseXML:XMLHttp.responseText;if(/json/i.test(responseType)&&!!response){response=(typeof JSON==="object"&&typeof JSON.parse==="function")?JSON.parse(response):eval("("+response+")")}globalXMLHttp=null;XMLHttp.onreadystatechange=function(){};requestPool.push(XMLHttp);callback.call(elm,response,addToContent)}}catch(e){globalXMLHttp=XMLHttp=null;if(typeof ex==="function"){ex.call(elm,e);ex=null}}}}XMLHttp.send(params);if(timeout){timeoutId=window.setTimeout(function(){if(!done){XMLHttp.abort();done=true;if(typeof ex==="function"){readyState=0;status=408;statusText="Request timeout";globalXMLHttp=XMLHttp=null;ex.call(elm,new Error(statusText));ex=null}}},timeout)}})(this)}return this},replaceWithAJAXContent:function(content,add){if(add){this.innerHTML+=content}else{DOMAssistant.cleanUp(this);this.innerHTML=content}},getReadyState:function(){return(globalXMLHttp&&DOMAssistant.def(globalXMLHttp.readyState))?globalXMLHttp.readyState:readyState},getStatus:function(){return status},getStatusText:function(){return statusText}}}();DOMAssistant.attach(DOMAssistant.AJAX);DOMAssistant.CSS=function(){var a=DOMAssistant.def,b={display:true};return{addClass:function(d){if(!this.hasClass(d)){var c=this.className;this.className=c+(c.length?" ":"")+d}return this},removeClass:function(c){return this.replaceClass(c)},replaceClass:function(d,e){var c=new RegExp(("(^|\\s)"+d+"(\\s|$)"),"i");this.className=this.className.replace(c,function(f,h,g){return e?(h+e+g):" "}).replace(/^\s+|\s+$/g,"");return this},hasClass:function(c){return(" "+this.className+" ").indexOf(" "+c+" ")>-1},setStyle:function(f,g){var e=this.style;if("filters" in this&&(typeof f==="string"?/opacity/i.test(f):a(f.opacity))){e.zoom=1;e.filter=(e.filter||"").replace(/alpha\([^)]*\)/,"")+"alpha(opacity="+(a(f.opacity)?f.opacity:g)*100+")"}if(a(e.cssText)){var c=e.cssText;if(typeof f==="object"){for(var d in f){if(typeof d==="string"){if(b[d]){e[d]=f[d]}c+=";"+d+":"+f[d]}}}else{if(b[f]){e[f]=g}c+=";"+f+":"+g}e.cssText=c}return this},getStyle:function(c){var e="",d;c=c.toLowerCase();if(document.defaultView&&document.defaultView.getComputedStyle){e=document.defaultView.getComputedStyle(this,"").getPropertyValue(c)}else{if(this.currentStyle){if("filters" in this&&c==="opacity"){e=(d=this.style.filter||this.currentStyle.filter)&&d.indexOf("opacity=")>=0?parseFloat(d.match(/opacity=([^)]*)/)[1])/100:1}else{c=c.replace(/^float$/,"styleFloat").replace(/\-(\w)/g,function(f,g){return g.toUpperCase()});e=this.currentStyle[c]}if(e==="auto"&&/^(width|height)$/.test(c)&&this.currentStyle.display!=="none"){e=this["offset"+c.charAt(0).toUpperCase()+c.substr(1)]+"px"}}}return e}}}();DOMAssistant.attach(DOMAssistant.CSS);DOMAssistant.Content=function(){var a=DOMAssistant.$$;return{init:function(){DOMAssistant.setCache(false)},create:function(d,c,b,e){var f=a(document.createElement(d));if(c){f=f.setAttributes(c)}if(DOMAssistant.def(e)){f.addContent(e)}if(b){this.appendChild(f)}return f},setAttributes:function(b){if(DOMAssistant.isIE){var c=function(g,e,f){var d=e.toLowerCase();switch(d){case"name":case"type":case"multiple":return a(document.createElement(g.outerHTML.replace(new RegExp(d+"(=[a-zA-Z]+)?")," ").replace(">"," "+d+"="+f+">")));case"style":g.style.cssText=f;return g;default:g[DOMAssistant.camel[d]||e]=f;return g}};DOMAssistant.Content.setAttributes=function(d){var h=this;var g=this.parentNode;for(var f in d){if(typeof d[f]==="string"||typeof d[f]==="number"){var e=c(h,f,d[f]);if(g&&/(name|type)/i.test(f)){if(h.innerHTML){e.innerHTML=h.innerHTML}g.replaceChild(e,h)}h=e}}return h}}else{DOMAssistant.Content.setAttributes=function(d){for(var e in d){if(/class/i.test(e)){this.className=d[e]}else{this.setAttribute(e,d[e])}}return this}}return DOMAssistant.Content.setAttributes.call(this,b)},addContent:function(f){var d=typeof f;if(d==="string"||d==="number"){if(!this.firstChild){this.innerHTML=f}else{var c=document.createElement("div");c.innerHTML=f;for(var b=c.childNodes.length-1,e=null;b>=0;b--){e=this.insertBefore(c.childNodes[b],e)}}}else{if(d==="object"||(d==="function"&&!!f.nodeName)){this.appendChild(f)}}return this},replaceContent:function(b){DOMAssistant.cleanUp(this);return this.addContent(b)},replace:function(g,b){var f=typeof g;if(f==="string"||f==="number"){var e=this.parentNode;var d=DOMAssistant.Content.create.call(e,"div",null,false,g);for(var c=d.childNodes.length;c--;){e.insertBefore(d.childNodes[c],this.nextSibling)}g=this.nextSibling;e.removeChild(this)}else{if(f==="object"||(f==="function"&&!!g.nodeName)){this.parentNode.replaceChild(g,this)}}return b?g:this},remove:function(){DOMAssistant.cleanUp(this);if(this.hasData()){if(this.removeEvent){this.removeEvent()}this.unstore()}this.parentNode.removeChild(this);return null}}}();DOMAssistant.attach(DOMAssistant.Content);DOMAssistant.Events=function(){var i,g="_events",c=!!document.addEventListener,a={focus:true,blur:true},b=DOMAssistant.isIE?{focus:"activate",blur:"deactivate",mouseenter:"mouseover",mouseleave:"mouseout"}:{mouseenter:"mouseover",mouseleave:"mouseout"},f={special:/^submit|reset|change|select$/i,mouseenterleave:/^mouse(enter|leave)$/i,dom:/^DOM/,on:/^on/i},e=function(j){return DOMAssistant.isIE&&f.special.test(j)},d=function(j){return b[j]||j},h=function(n,k,m){n=n||window.event||{};if(n.event){return n}var l={event:n,type:k||n.type,bubbles:n.bubbles||true,cancelable:n.cancelable||false,target:m||n.target||n.srcElement,clientX:n.clientX||0,clientY:n.clientY||0,altKey:n.altKey||false,ctrlKey:n.ctrlKey||false,shiftKey:n.shiftKey||false,button:n.button||null,timeStamp:+new Date(),preventDefault:function(){if(n.preventDefault){n.preventDefault()}this.returnValue=n.returnValue=false},stopPropagation:function(){if(n.stopPropagation){n.stopPropagation()}this.cancelBubble=n.cancelBubble=true}};if(l.target&&3===l.target.nodeType){l.target=l.target.parentNode}l.currentTarget=l.target;l.relatedTarget=n.relatedTarget||(n.fromElement===l.target?n.toElement:n.fromElement)||null;var o=document.documentElement,j=document.body;l.pageX=DOMAssistant.def(n.pageX)?n.pageX:(l.clientX+(o.scrollLeft||j.scrollLeft)-(o.clientLeft||0));l.pageY=DOMAssistant.def(n.pageY)?n.pageY:(l.clientY+(o.scrollTop||j.scrollTop)-(o.clientTop||0));if("number"===typeof n.which){l.keyCode=n.keyCode;l.charCode=l.which=n.which}else{if(n.keyCode){l.keyCode=l.charCode=n.keyCode}}return l};return{publicMethods:["triggerEvent","addEvent","removeEvent","relayEvent","unrelayEvent","preventDefault","cancelBubble"],init:function(){DOMAssistant.preventDefault=this.preventDefault;DOMAssistant.cancelBubble=this.cancelBubble;i=this.handleEvent},triggerEvent:function(r,o,q){var m=d(r),s=this.retrieve(g),j=q||h(q,m,o||this);j.currentTarget=this;if(s&&s[m]){for(var n=0,l=s[m].length;n<l;n++){if(s[m][n].call(this,j)===false){j.stopPropagation()}}}else{if(typeof this["on"+m]==="function"){this["on"+m].call(this,j)}}var k=DOMAssistant.$$(this.parentNode);if(!j.cancelBubble&&k&&k.nodeType===1){k.triggerEvent(m,o,j)}return this},addEvent:function(r,l,k,q,n){var j,m=d(r),p=m+this.retrieve(),o="on"+m;if(!(l.attachedElements&&l.attachedElements[p])){var s=this.retrieve(g)||{};if(!s[m]){s[m]=[];j=this[o];this[o]=null}if(typeof this.window==="object"){this.window[o]=i}else{if(!s[m].length){if(c){this.addEventListener(m,i,a[m])}else{this[o]=i}}}if(j){s[m].push(j)}if(m!==r){l.evt=r}l.relay=k;l.proxy=q;l.selector=n;l.attachedElements=l.attachedElements||{};l.attachedElements[p]=true;s[m].push(l);this.store(g,s)}return this},handleEvent:function(r){var q=(r&&f.dom.test(r.type)&&c)?r:h(r),o=d(q.type),p=q.target,l=q.relatedTarget,n=this.retrieve(g)[o].slice(0),t,j,s;if((t=n.length)){for(var m=0;m<t;m++){if(typeof n[m]==="function"){if((s=n[m].evt)&&s!==o){q.type=s;if(l&&f.mouseenterleave.test(s)){if(n[m].relay){var k=n[m].elms||(n[m].elms=this.cssSelect(n[m].selector));if(k.indexOf(p)<0||!DOMAssistant.hasChild.call(l,p)){continue}}else{if(this===l||this.hasChild(l)){continue}}}}j=n[m].call(this,q)}}if(j===false){q.stopPropagation()}return j}},removeEvent:function(w,l,k,s){var q=(w=d(w))+this.retrieve(),x=this.retrieve(g),p="on"+w;if(x&&!w){for(var v in x){if(x[v].length){this.removeEvent(v)}}var r=this.attributes;for(var t,m=r.length;m--;){t=r[m].nodeName.toLowerCase();if(f.on.test(t)&&typeof this[t]==="function"){this[t]=null}}}else{if(x&&x[w]){var o=x[w];for(var u,n=o.length;n--;){u=l||o[n];if(o[n]===u&&k===u.relay&&s===u.proxy){o.splice(n,1);if(!!s&&u.selector){this.cssSelect(u.selector).removeEvent(s)}if(u.attachedElements){u.attachedElements[q]=null}}}if(!x[w].length){if(c){this.removeEventListener(w,i,a[w])}else{this[p]=null}}}else{if(this[p]&&!l&&!k){this[p]=null}}}return this},relayEvent:function(k,j,m,l){if(e(k)){this.relayEvent("focus",j,function(){DOMAssistant.$$(this).removeEvent(k).addEvent(k,function(n){return m.call(this,h(n))})},k).relayEvent("blur",j,function(){DOMAssistant.$$(this).removeEvent(k)},k);return this}return this.addEvent(k,function(s){s=h(s);var r=s.target,n=arguments,o=0,t,p=this.cssSelect(j);while((t=p[o++])){if((t===r||DOMAssistant.hasChild.call(t,r))&&!t.disabled){s.currentTarget=t;var q=m.apply(t,n);if(!q){s.preventDefault()}return q}}},true,l,j)},unrelayEvent:function(j){if(e(j)){return this.removeEvent("focus",null,true,j).removeEvent("blur",null,true,j)}return this.removeEvent(j,null,true)},preventDefault:function(j){if(j.preventDefault){j.preventDefault()}j.returnValue=false},cancelBubble:function(j){if(j.stopPropagation){j.stopPropagation()}j.cancelBubble=true}}}();DOMAssistant.attach(DOMAssistant.Events);DOMAssistant.DOMLoad=function(){var g=false,a=null,f=[],b={},c=null,d=function(){for(var j=0,h=f.length;j<h;j++){try{f[j]()}catch(k){if(c&&typeof c==="function"){c(k)}}}f=[]},e=function(){if(g){return}g=true;d()};
|
|
3
|
+
/*@cc_on @if(@_win32||@_win64)document.write("<script id=\"ieScriptLoad\" defer src=\"//:\"><\/script>");document.getElementById("ieScriptLoad").onreadystatechange=function(){if(this.readyState==="complete"){e()}}@end@*/
|
|
4
|
+
if(document.addEventListener){document.addEventListener("DOMContentLoaded",e,false)}if(/KHTML|WebKit|iCab/i.test(navigator.userAgent)){a=setInterval(function(){if(/loaded|complete/i.test(document.readyState)){e();clearInterval(a)}},10)}window.onload=e;return{DOMReady:function(){for(var j=0,h=arguments.length,k;j<h;j++){k=arguments[j];if(!k.DOMReady&&!b[k]){if(typeof k==="string"){b[k]=true;k=new Function(k)}k.DOMReady=true;f.push(k)}}if(g){d()}},setErrorHandling:function(h){c=h}}}();DOMAssistant.DOMReady=DOMAssistant.DOMLoad.DOMReady;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/* Modernizr 2.0.6 (Custom Build) | MIT & BSD
|
|
2
|
+
* Contains: rgba | input | inputtypes | iepp | cssclasses
|
|
3
|
+
*/
|
|
4
|
+
;window.Modernizr=function(a,b,c){function z(){e.input=function(a){for(var b=0,c=a.length;b<c;b++)q[a[b]]=a[b]in l;return q}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),e.inputtypes=function(a){for(var d=0,e,f,h,i=a.length;d<i;d++)l.setAttribute("type",f=a[d]),e=l.type!=="text",e&&(l.value=m,l.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&l.style.WebkitAppearance!==c?(g.appendChild(l),h=b.defaultView,e=h.getComputedStyle&&h.getComputedStyle(l,null).WebkitAppearance!=="textfield"&&l.offsetHeight!==0,g.removeChild(l)):/^(search|tel)$/.test(f)||(/^(url|email)$/.test(f)?e=l.checkValidity&&l.checkValidity()===!1:/^color$/.test(f)?(g.appendChild(l),g.offsetWidth,e=l.value!=m,g.removeChild(l)):e=l.value!=m)),p[a[d]]=!!e;return p}("search tel url email datetime date month week time datetime-local number range color".split(" "))}function y(a,b){return!!~(""+a).indexOf(b)}function x(a,b){return typeof a===b}function w(a,b){return v(prefixes.join(a+";")+(b||""))}function v(a){k.cssText=a}var d="2.0.6",e={},f=!0,g=b.documentElement,h=b.head||b.getElementsByTagName("head")[0],i="modernizr",j=b.createElement(i),k=j.style,l=b.createElement("input"),m=":)",n=Object.prototype.toString,o={},p={},q={},r=[],s,t={}.hasOwnProperty,u;!x(t,c)&&!x(t.call,c)?u=function(a,b){return t.call(a,b)}:u=function(a,b){return b in a&&x(a.constructor.prototype[b],c)},o.rgba=function(){v("background-color:rgba(150,255,150,.5)");return y(k.backgroundColor,"rgba")};for(var A in o)u(o,A)&&(s=A.toLowerCase(),e[s]=o[A](),r.push((e[s]?"":"no-")+s));e.input||z(),v(""),j=l=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b<g)a.createElement(f[b])}a.iepp=a.iepp||{};var d=a.iepp,e=d.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",f=e.split("|"),g=f.length,h=new RegExp("(^|\\s)("+e+")","gi"),i=new RegExp("<(/*)("+e+")","gi"),j=/^\s*[\{\}]\s*$/,k=new RegExp("(^|[^\\n]*?\\s)("+e+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),l=b.createDocumentFragment(),m=b.documentElement,n=m.firstChild,o=b.createElement("body"),p=b.createElement("style"),q=/print|all/,r;d.getCSS=function(a,b){if(a+""===c)return"";var e=-1,f=a.length,g,h=[];while(++e<f){g=a[e];if(g.disabled)continue;b=g.media||b,q.test(b)&&h.push(d.getCSS(g.imports,b),g.cssText),b="all"}return h.join("")},d.parseCSS=function(a){var b=[],c;while((c=k.exec(a))!=null)b.push(((j.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(h,"$1.iepp_$2")+c[4]);return b.join("\n")},d.writeHTML=function(){var a=-1;r=r||b.body;while(++a<g){var c=b.getElementsByTagName(f[a]),d=c.length,e=-1;while(++e<d)c[e].className.indexOf("iepp_")<0&&(c[e].className+=" iepp_"+f[a])}l.appendChild(r),m.appendChild(o),o.className=r.className,o.id=r.id,o.innerHTML=r.innerHTML.replace(i,"<$1font")},d._beforePrint=function(){p.styleSheet.cssText=d.parseCSS(d.getCSS(b.styleSheets,"all")),d.writeHTML()},d.restoreHTML=function(){o.innerHTML="",m.removeChild(o),m.appendChild(r)},d._afterPrint=function(){d.restoreHTML(),p.styleSheet.cssText=""},s(b),s(l);d.disablePP||(n.insertBefore(p,n.firstChild),p.media="print",p.className="iepp-printshim",a.attachEvent("onbeforeprint",d._beforePrint),a.attachEvent("onafterprint",d._afterPrint))}(a,b),e._version=d,g.className=g.className.replace(/\bno-js\b/,"")+(f?" js "+r.join(" "):"");return e}(this,this.document);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! Respond.js: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */
|
|
2
|
+
(function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length,z=0,y,x,A,v;for(;z<w;z++){y=B[z],x=y.href,A=y.media,v=y.rel&&y.rel.toLowerCase()==="stylesheet";if(!!x&&v&&!o[x]){if(!/^([a-zA-Z]+?:(\/\/)?)/.test(x)||x.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:x,media:A})}else{o[x]=true}}}t()},t=function(){if(d.length){var v=d.shift();n(v.href,function(w){m(w,v.href,v.media);o[v.href]=true;t()})}},m=function(G,v,x){var E=G.match(/@media[^\{]+\{([^\{\}]+\{[^\}\{]+\})+/gi),H=E&&E.length||0,v=v.substring(0,v.lastIndexOf("/")),w=function(I){return I.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+v+"$2$3")},y=!H&&x,B=0,A,C,D,z,F;if(v.length){v+="/"}if(y){H=1}for(;B<H;B++){A=0;if(y){C=x;k.push(w(G))}else{C=E[B].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&w(RegExp.$2))}z=C.split(",");F=z.length;for(;A<F;A++){D=z[A];i.push({media:D.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:k.length-1,minw:D.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:D.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}}j()},l,q,j=function(E){var v="clientWidth",x=r[v],D=u.compatMode==="CSS1Compat"&&x||u.body[v]||x,z={},C=u.createDocumentFragment(),B=b[b.length-1],w=(new Date()).getTime();if(E&&l&&w-l<g){clearTimeout(q);q=setTimeout(j,g);return}else{l=w}for(var y in i){var F=i[y];if(!F.minw&&!F.maxw||(!F.minw||F.minw&&D>=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send(null)},c=(function(){var v=false,w=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest()}],y=w.length;while(y--){try{v=w[y]()}catch(x){continue}break}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_<style media="'+a+'"> #mq-test-1 { width: 9px; }</style>';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this));
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* selectivizr v1.0.2 - (c) Keith Clark, freely distributable under the terms of the MIT license.
|
|
3
|
+
* selectivizr.com
|
|
4
|
+
*/
|
|
5
|
+
(function(j){function A(a){return a.replace(B,h).replace(C,function(a,d,b){for(var a=b.split(","),b=0,e=a.length;b<e;b++){var s=D(a[b].replace(E,h).replace(F,h))+o,l=[];a[b]=s.replace(G,function(a,b,c,d,e){if(b){if(l.length>0){var a=l,f,e=s.substring(0,e).replace(H,i);if(e==i||e.charAt(e.length-1)==o)e+="*";try{f=t(e)}catch(k){}if(f){e=0;for(c=f.length;e<c;e++){for(var d=f[e],h=d.className,j=0,m=a.length;j<m;j++){var g=a[j];if(!RegExp("(^|\\s)"+g.className+"(\\s|$)").test(d.className)&&g.b&&(g.b===!0||g.b(d)===!0))h=u(h,g.className,!0)}d.className=h}}l=[]}return b}else{if(b=c?I(c):!v||v.test(d)?{className:w(d),b:!0}:null)return l.push(b),"."+b.className;return a}})}return d+a.join(",")})}function I(a){var c=!0,d=w(a.slice(1)),b=a.substring(0,5)==":not(",e,f;b&&(a=a.slice(5,-1));var l=a.indexOf("(");l>-1&&(a=a.substring(0,l));if(a.charAt(0)==":")switch(a.slice(1)){case "root":c=function(a){return b?a!=p:a==p};break;case "target":if(m==8){c=function(a){function c(){var d=location.hash,e=d.slice(1);return b?d==i||a.id!=e:d!=i&&a.id==e}k(j,"hashchange",function(){g(a,d,c())});return c()};break}return!1;case "checked":c=function(a){J.test(a.type)&&k(a,"propertychange",function(){event.propertyName=="checked"&&g(a,d,a.checked!==b)});return a.checked!==b};break;case "disabled":b=!b;case "enabled":c=function(c){if(K.test(c.tagName))return k(c,"propertychange",function(){event.propertyName=="$disabled"&&g(c,d,c.a===b)}),q.push(c),c.a=c.disabled,c.disabled===b;return a==":enabled"?b:!b};break;case "focus":e="focus",f="blur";case "hover":e||(e="mouseenter",f="mouseleave");c=function(a){k(a,b?f:e,function(){g(a,d,!0)});k(a,b?e:f,function(){g(a,d,!1)});return b};break;default:if(!L.test(a))return!1}return{className:d,b:c}}function w(a){return M+"-"+(m==6&&N?O++:a.replace(P,function(a){return a.charCodeAt(0)}))}function D(a){return a.replace(x,h).replace(Q,o)}function g(a,c,d){var b=a.className,c=u(b,c,d);if(c!=b)a.className=c,a.parentNode.className+=i}function u(a,c,d){var b=RegExp("(^|\\s)"+c+"(\\s|$)"),e=b.test(a);return d?e?a:a+o+c:e?a.replace(b,h).replace(x,h):a}function k(a,c,d){a.attachEvent("on"+c,d)}function r(a,c){if(/^https?:\/\//i.test(a))return c.substring(0,c.indexOf("/",8))==a.substring(0,a.indexOf("/",8))?a:null;if(a.charAt(0)=="/")return c.substring(0,c.indexOf("/",8))+a;var d=c.split(/[?#]/)[0];a.charAt(0)!="?"&&d.charAt(d.length-1)!="/"&&(d=d.substring(0,d.lastIndexOf("/")+1));return d+a}function y(a){if(a)return n.open("GET",a,!1),n.send(),(n.status==200?n.responseText:i).replace(R,i).replace(S,function(c,d,b,e,f){return y(r(b||f,a))}).replace(T,function(c,d,b){d=d||i;return" url("+d+r(b,a)+d+") "});return i}function U(){var a,c;a=f.getElementsByTagName("BASE");for(var d=a.length>0?a[0].href:f.location.href,b=0;b<f.styleSheets.length;b++)if(c=f.styleSheets[b],c.href!=i&&(a=r(c.href,d)))c.cssText=A(y(a));q.length>0&&setInterval(function(){for(var a=0,c=q.length;a<c;a++){var b=q[a];if(b.disabled!==b.a)b.disabled?(b.disabled=!1,b.a=!0,b.disabled=!0):b.a=b.disabled}},250)}if(!/*@cc_on!@*/true){var f=document,p=f.documentElement,n=function(){if(j.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){return null}}(),m=/MSIE (\d+)/.exec(navigator.userAgent)[1];if(!(f.compatMode!="CSS1Compat"||m<6||m>8||!n)){var z={NW:"*.Dom.select",MooTools:"$$",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",Sizzle:"*",jQuery:"*",dojo:"*.query"},t,q=[],O=0,N=!0,M="slvzr",R=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g,S=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))[^;]*;/g,T=/\burl\(\s*(["']?)(?!data:)([^"')]+)\1\s*\)/g,L=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,B=/:(:first-(?:line|letter))/g,C=/(^|})\s*([^\{]*?[\[:][^{]+)/g,G=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,H=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,P=/[^\w-]/g,K=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,J=/^(checkbox|radio)$/,v=m>6?/[\$\^*]=(['"])\1/:null,E=/([(\[+~])\s+/g,F=/\s+([)\]+~])/g,Q=/\s+/g,x=/^\s*((?:[\S\s]*\S)?)\s*$/,i="",o=" ",h="$1";(function(a,c){function d(){try{p.doScroll("left")}catch(a){setTimeout(d,50);return}b("poll")}function b(d){if(!(d.type=="readystatechange"&&f.readyState!="complete")&&((d.type=="load"?a:f).detachEvent("on"+d.type,b,!1),!e&&(e=!0)))c.call(a,d.type||d)}var e=!1,g=!0;if(f.readyState=="complete")c.call(a,i);else{if(f.createEventObject&&p.doScroll){try{g=!a.frameElement}catch(h){}g&&d()}k(f,"readystatechange",b);k(a,"load",b)}})(j,function(){for(var a in z){var c,d,b=j;if(j[a]){for(c=z[a].replace("*",a).split(".");(d=c.shift())&&(b=b[d]););if(typeof b=="function"){t=b;U();break}}}})}}})(this);
|
|
@@ -0,0 +1,2027 @@
|
|
|
1
|
+
/* ===================================================
|
|
2
|
+
* bootstrap-transition.js v2.1.1
|
|
3
|
+
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
|
4
|
+
* ===================================================
|
|
5
|
+
* Copyright 2012 Twitter, Inc.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
* ========================================================== */
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
!function ($) {
|
|
22
|
+
|
|
23
|
+
$(function () {
|
|
24
|
+
|
|
25
|
+
"use strict"; // jshint ;_;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
|
|
29
|
+
* ======================================================= */
|
|
30
|
+
|
|
31
|
+
$.support.transition = (function () {
|
|
32
|
+
|
|
33
|
+
var transitionEnd = (function () {
|
|
34
|
+
|
|
35
|
+
var el = document.createElement('bootstrap')
|
|
36
|
+
, transEndEventNames = {
|
|
37
|
+
'WebkitTransition' : 'webkitTransitionEnd'
|
|
38
|
+
, 'MozTransition' : 'transitionend'
|
|
39
|
+
, 'OTransition' : 'oTransitionEnd otransitionend'
|
|
40
|
+
, 'transition' : 'transitionend'
|
|
41
|
+
}
|
|
42
|
+
, name
|
|
43
|
+
|
|
44
|
+
for (name in transEndEventNames){
|
|
45
|
+
if (el.style[name] !== undefined) {
|
|
46
|
+
return transEndEventNames[name]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}())
|
|
51
|
+
|
|
52
|
+
return transitionEnd && {
|
|
53
|
+
end: transitionEnd
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
})()
|
|
57
|
+
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
}(window.jQuery);/* ==========================================================
|
|
61
|
+
* bootstrap-alert.js v2.1.1
|
|
62
|
+
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
|
63
|
+
* ==========================================================
|
|
64
|
+
* Copyright 2012 Twitter, Inc.
|
|
65
|
+
*
|
|
66
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
67
|
+
* you may not use this file except in compliance with the License.
|
|
68
|
+
* You may obtain a copy of the License at
|
|
69
|
+
*
|
|
70
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
71
|
+
*
|
|
72
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
73
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
74
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
75
|
+
* See the License for the specific language governing permissions and
|
|
76
|
+
* limitations under the License.
|
|
77
|
+
* ========================================================== */
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
!function ($) {
|
|
81
|
+
|
|
82
|
+
"use strict"; // jshint ;_;
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/* ALERT CLASS DEFINITION
|
|
86
|
+
* ====================== */
|
|
87
|
+
|
|
88
|
+
var dismiss = '[data-dismiss="alert"]'
|
|
89
|
+
, Alert = function (el) {
|
|
90
|
+
$(el).on('click', dismiss, this.close)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
Alert.prototype.close = function (e) {
|
|
94
|
+
var $this = $(this)
|
|
95
|
+
, selector = $this.attr('data-target')
|
|
96
|
+
, $parent
|
|
97
|
+
|
|
98
|
+
if (!selector) {
|
|
99
|
+
selector = $this.attr('href')
|
|
100
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
$parent = $(selector)
|
|
104
|
+
|
|
105
|
+
e && e.preventDefault()
|
|
106
|
+
|
|
107
|
+
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
|
|
108
|
+
|
|
109
|
+
$parent.trigger(e = $.Event('close'))
|
|
110
|
+
|
|
111
|
+
if (e.isDefaultPrevented()) return
|
|
112
|
+
|
|
113
|
+
$parent.removeClass('in')
|
|
114
|
+
|
|
115
|
+
function removeElement() {
|
|
116
|
+
$parent
|
|
117
|
+
.trigger('closed')
|
|
118
|
+
.remove()
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
$.support.transition && $parent.hasClass('fade') ?
|
|
122
|
+
$parent.on($.support.transition.end, removeElement) :
|
|
123
|
+
removeElement()
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
/* ALERT PLUGIN DEFINITION
|
|
128
|
+
* ======================= */
|
|
129
|
+
|
|
130
|
+
$.fn.alert = function (option) {
|
|
131
|
+
return this.each(function () {
|
|
132
|
+
var $this = $(this)
|
|
133
|
+
, data = $this.data('alert')
|
|
134
|
+
if (!data) $this.data('alert', (data = new Alert(this)))
|
|
135
|
+
if (typeof option == 'string') data[option].call($this)
|
|
136
|
+
})
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
$.fn.alert.Constructor = Alert
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
/* ALERT DATA-API
|
|
143
|
+
* ============== */
|
|
144
|
+
|
|
145
|
+
$(function () {
|
|
146
|
+
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
}(window.jQuery);/* ============================================================
|
|
150
|
+
* bootstrap-button.js v2.1.1
|
|
151
|
+
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
|
152
|
+
* ============================================================
|
|
153
|
+
* Copyright 2012 Twitter, Inc.
|
|
154
|
+
*
|
|
155
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
156
|
+
* you may not use this file except in compliance with the License.
|
|
157
|
+
* You may obtain a copy of the License at
|
|
158
|
+
*
|
|
159
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
160
|
+
*
|
|
161
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
162
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
163
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
164
|
+
* See the License for the specific language governing permissions and
|
|
165
|
+
* limitations under the License.
|
|
166
|
+
* ============================================================ */
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
!function ($) {
|
|
170
|
+
|
|
171
|
+
"use strict"; // jshint ;_;
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
/* BUTTON PUBLIC CLASS DEFINITION
|
|
175
|
+
* ============================== */
|
|
176
|
+
|
|
177
|
+
var Button = function (element, options) {
|
|
178
|
+
this.$element = $(element)
|
|
179
|
+
this.options = $.extend({}, $.fn.button.defaults, options)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
Button.prototype.setState = function (state) {
|
|
183
|
+
var d = 'disabled'
|
|
184
|
+
, $el = this.$element
|
|
185
|
+
, data = $el.data()
|
|
186
|
+
, val = $el.is('input') ? 'val' : 'html'
|
|
187
|
+
|
|
188
|
+
state = state + 'Text'
|
|
189
|
+
data.resetText || $el.data('resetText', $el[val]())
|
|
190
|
+
|
|
191
|
+
$el[val](data[state] || this.options[state])
|
|
192
|
+
|
|
193
|
+
// push to event loop to allow forms to submit
|
|
194
|
+
setTimeout(function () {
|
|
195
|
+
state == 'loadingText' ?
|
|
196
|
+
$el.addClass(d).attr(d, d) :
|
|
197
|
+
$el.removeClass(d).removeAttr(d)
|
|
198
|
+
}, 0)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
Button.prototype.toggle = function () {
|
|
202
|
+
var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
|
|
203
|
+
|
|
204
|
+
$parent && $parent
|
|
205
|
+
.find('.active')
|
|
206
|
+
.removeClass('active')
|
|
207
|
+
|
|
208
|
+
this.$element.toggleClass('active')
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
/* BUTTON PLUGIN DEFINITION
|
|
213
|
+
* ======================== */
|
|
214
|
+
|
|
215
|
+
$.fn.button = function (option) {
|
|
216
|
+
return this.each(function () {
|
|
217
|
+
var $this = $(this)
|
|
218
|
+
, data = $this.data('button')
|
|
219
|
+
, options = typeof option == 'object' && option
|
|
220
|
+
if (!data) $this.data('button', (data = new Button(this, options)))
|
|
221
|
+
if (option == 'toggle') data.toggle()
|
|
222
|
+
else if (option) data.setState(option)
|
|
223
|
+
})
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
$.fn.button.defaults = {
|
|
227
|
+
loadingText: 'loading...'
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
$.fn.button.Constructor = Button
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
/* BUTTON DATA-API
|
|
234
|
+
* =============== */
|
|
235
|
+
|
|
236
|
+
$(function () {
|
|
237
|
+
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
|
|
238
|
+
var $btn = $(e.target)
|
|
239
|
+
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
|
|
240
|
+
$btn.button('toggle')
|
|
241
|
+
})
|
|
242
|
+
})
|
|
243
|
+
|
|
244
|
+
}(window.jQuery);/* ==========================================================
|
|
245
|
+
* bootstrap-carousel.js v2.1.1
|
|
246
|
+
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
|
247
|
+
* ==========================================================
|
|
248
|
+
* Copyright 2012 Twitter, Inc.
|
|
249
|
+
*
|
|
250
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
251
|
+
* you may not use this file except in compliance with the License.
|
|
252
|
+
* You may obtain a copy of the License at
|
|
253
|
+
*
|
|
254
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
255
|
+
*
|
|
256
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
257
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
258
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
259
|
+
* See the License for the specific language governing permissions and
|
|
260
|
+
* limitations under the License.
|
|
261
|
+
* ========================================================== */
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
!function ($) {
|
|
265
|
+
|
|
266
|
+
"use strict"; // jshint ;_;
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/* CAROUSEL CLASS DEFINITION
|
|
270
|
+
* ========================= */
|
|
271
|
+
|
|
272
|
+
var Carousel = function (element, options) {
|
|
273
|
+
this.$element = $(element)
|
|
274
|
+
this.options = options
|
|
275
|
+
this.options.slide && this.slide(this.options.slide)
|
|
276
|
+
this.options.pause == 'hover' && this.$element
|
|
277
|
+
.on('mouseenter', $.proxy(this.pause, this))
|
|
278
|
+
.on('mouseleave', $.proxy(this.cycle, this))
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
Carousel.prototype = {
|
|
282
|
+
|
|
283
|
+
cycle: function (e) {
|
|
284
|
+
if (!e) this.paused = false
|
|
285
|
+
this.options.interval
|
|
286
|
+
&& !this.paused
|
|
287
|
+
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
|
288
|
+
return this
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
, to: function (pos) {
|
|
292
|
+
var $active = this.$element.find('.item.active')
|
|
293
|
+
, children = $active.parent().children()
|
|
294
|
+
, activePos = children.index($active)
|
|
295
|
+
, that = this
|
|
296
|
+
|
|
297
|
+
if (pos > (children.length - 1) || pos < 0) return
|
|
298
|
+
|
|
299
|
+
if (this.sliding) {
|
|
300
|
+
return this.$element.one('slid', function () {
|
|
301
|
+
that.to(pos)
|
|
302
|
+
})
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
if (activePos == pos) {
|
|
306
|
+
return this.pause().cycle()
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
, pause: function (e) {
|
|
313
|
+
if (!e) this.paused = true
|
|
314
|
+
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
|
|
315
|
+
this.$element.trigger($.support.transition.end)
|
|
316
|
+
this.cycle()
|
|
317
|
+
}
|
|
318
|
+
clearInterval(this.interval)
|
|
319
|
+
this.interval = null
|
|
320
|
+
return this
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
, next: function () {
|
|
324
|
+
if (this.sliding) return
|
|
325
|
+
return this.slide('next')
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
, prev: function () {
|
|
329
|
+
if (this.sliding) return
|
|
330
|
+
return this.slide('prev')
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
, slide: function (type, next) {
|
|
334
|
+
var $active = this.$element.find('.item.active')
|
|
335
|
+
, $next = next || $active[type]()
|
|
336
|
+
, isCycling = this.interval
|
|
337
|
+
, direction = type == 'next' ? 'left' : 'right'
|
|
338
|
+
, fallback = type == 'next' ? 'first' : 'last'
|
|
339
|
+
, that = this
|
|
340
|
+
, e = $.Event('slide', {
|
|
341
|
+
relatedTarget: $next[0]
|
|
342
|
+
})
|
|
343
|
+
|
|
344
|
+
this.sliding = true
|
|
345
|
+
|
|
346
|
+
isCycling && this.pause()
|
|
347
|
+
|
|
348
|
+
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
|
349
|
+
|
|
350
|
+
if ($next.hasClass('active')) return
|
|
351
|
+
|
|
352
|
+
if ($.support.transition && this.$element.hasClass('slide')) {
|
|
353
|
+
this.$element.trigger(e)
|
|
354
|
+
if (e.isDefaultPrevented()) return
|
|
355
|
+
$next.addClass(type)
|
|
356
|
+
$next[0].offsetWidth // force reflow
|
|
357
|
+
$active.addClass(direction)
|
|
358
|
+
$next.addClass(direction)
|
|
359
|
+
this.$element.one($.support.transition.end, function () {
|
|
360
|
+
$next.removeClass([type, direction].join(' ')).addClass('active')
|
|
361
|
+
$active.removeClass(['active', direction].join(' '))
|
|
362
|
+
that.sliding = false
|
|
363
|
+
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
|
364
|
+
})
|
|
365
|
+
} else {
|
|
366
|
+
this.$element.trigger(e)
|
|
367
|
+
if (e.isDefaultPrevented()) return
|
|
368
|
+
$active.removeClass('active')
|
|
369
|
+
$next.addClass('active')
|
|
370
|
+
this.sliding = false
|
|
371
|
+
this.$element.trigger('slid')
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
isCycling && this.cycle()
|
|
375
|
+
|
|
376
|
+
return this
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
/* CAROUSEL PLUGIN DEFINITION
|
|
383
|
+
* ========================== */
|
|
384
|
+
|
|
385
|
+
$.fn.carousel = function (option) {
|
|
386
|
+
return this.each(function () {
|
|
387
|
+
var $this = $(this)
|
|
388
|
+
, data = $this.data('carousel')
|
|
389
|
+
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
|
|
390
|
+
, action = typeof option == 'string' ? option : options.slide
|
|
391
|
+
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
|
392
|
+
if (typeof option == 'number') data.to(option)
|
|
393
|
+
else if (action) data[action]()
|
|
394
|
+
else if (options.interval) data.cycle()
|
|
395
|
+
})
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
$.fn.carousel.defaults = {
|
|
399
|
+
interval: 5000
|
|
400
|
+
, pause: 'hover'
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
$.fn.carousel.Constructor = Carousel
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
/* CAROUSEL DATA-API
|
|
407
|
+
* ================= */
|
|
408
|
+
|
|
409
|
+
$(function () {
|
|
410
|
+
$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
|
|
411
|
+
var $this = $(this), href
|
|
412
|
+
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
|
413
|
+
, options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
|
|
414
|
+
$target.carousel(options)
|
|
415
|
+
e.preventDefault()
|
|
416
|
+
})
|
|
417
|
+
})
|
|
418
|
+
|
|
419
|
+
}(window.jQuery);/* =============================================================
|
|
420
|
+
* bootstrap-collapse.js v2.1.1
|
|
421
|
+
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
|
422
|
+
* =============================================================
|
|
423
|
+
* Copyright 2012 Twitter, Inc.
|
|
424
|
+
*
|
|
425
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
426
|
+
* you may not use this file except in compliance with the License.
|
|
427
|
+
* You may obtain a copy of the License at
|
|
428
|
+
*
|
|
429
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
430
|
+
*
|
|
431
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
432
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
433
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
434
|
+
* See the License for the specific language governing permissions and
|
|
435
|
+
* limitations under the License.
|
|
436
|
+
* ============================================================ */
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
!function ($) {
|
|
440
|
+
|
|
441
|
+
"use strict"; // jshint ;_;
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
/* COLLAPSE PUBLIC CLASS DEFINITION
|
|
445
|
+
* ================================ */
|
|
446
|
+
|
|
447
|
+
var Collapse = function (element, options) {
|
|
448
|
+
this.$element = $(element)
|
|
449
|
+
this.options = $.extend({}, $.fn.collapse.defaults, options)
|
|
450
|
+
|
|
451
|
+
if (this.options.parent) {
|
|
452
|
+
this.$parent = $(this.options.parent)
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
this.options.toggle && this.toggle()
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
Collapse.prototype = {
|
|
459
|
+
|
|
460
|
+
constructor: Collapse
|
|
461
|
+
|
|
462
|
+
, dimension: function () {
|
|
463
|
+
var hasWidth = this.$element.hasClass('width')
|
|
464
|
+
return hasWidth ? 'width' : 'height'
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
, show: function () {
|
|
468
|
+
var dimension
|
|
469
|
+
, scroll
|
|
470
|
+
, actives
|
|
471
|
+
, hasData
|
|
472
|
+
|
|
473
|
+
if (this.transitioning) return
|
|
474
|
+
|
|
475
|
+
dimension = this.dimension()
|
|
476
|
+
scroll = $.camelCase(['scroll', dimension].join('-'))
|
|
477
|
+
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
|
|
478
|
+
|
|
479
|
+
if (actives && actives.length) {
|
|
480
|
+
hasData = actives.data('collapse')
|
|
481
|
+
if (hasData && hasData.transitioning) return
|
|
482
|
+
actives.collapse('hide')
|
|
483
|
+
hasData || actives.data('collapse', null)
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
this.$element[dimension](0)
|
|
487
|
+
this.transition('addClass', $.Event('show'), 'shown')
|
|
488
|
+
$.support.transition && this.$element[dimension](this.$element[0][scroll])
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
, hide: function () {
|
|
492
|
+
var dimension
|
|
493
|
+
if (this.transitioning) return
|
|
494
|
+
dimension = this.dimension()
|
|
495
|
+
this.reset(this.$element[dimension]())
|
|
496
|
+
this.transition('removeClass', $.Event('hide'), 'hidden')
|
|
497
|
+
this.$element[dimension](0)
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
, reset: function (size) {
|
|
501
|
+
var dimension = this.dimension()
|
|
502
|
+
|
|
503
|
+
this.$element
|
|
504
|
+
.removeClass('collapse')
|
|
505
|
+
[dimension](size || 'auto')
|
|
506
|
+
[0].offsetWidth
|
|
507
|
+
|
|
508
|
+
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
|
|
509
|
+
|
|
510
|
+
return this
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
, transition: function (method, startEvent, completeEvent) {
|
|
514
|
+
var that = this
|
|
515
|
+
, complete = function () {
|
|
516
|
+
if (startEvent.type == 'show') that.reset()
|
|
517
|
+
that.transitioning = 0
|
|
518
|
+
that.$element.trigger(completeEvent)
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
this.$element.trigger(startEvent)
|
|
522
|
+
|
|
523
|
+
if (startEvent.isDefaultPrevented()) return
|
|
524
|
+
|
|
525
|
+
this.transitioning = 1
|
|
526
|
+
|
|
527
|
+
this.$element[method]('in')
|
|
528
|
+
|
|
529
|
+
$.support.transition && this.$element.hasClass('collapse') ?
|
|
530
|
+
this.$element.one($.support.transition.end, complete) :
|
|
531
|
+
complete()
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
, toggle: function () {
|
|
535
|
+
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
/* COLLAPSIBLE PLUGIN DEFINITION
|
|
542
|
+
* ============================== */
|
|
543
|
+
|
|
544
|
+
$.fn.collapse = function (option) {
|
|
545
|
+
return this.each(function () {
|
|
546
|
+
var $this = $(this)
|
|
547
|
+
, data = $this.data('collapse')
|
|
548
|
+
, options = typeof option == 'object' && option
|
|
549
|
+
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
|
|
550
|
+
if (typeof option == 'string') data[option]()
|
|
551
|
+
})
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
$.fn.collapse.defaults = {
|
|
555
|
+
toggle: true
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
$.fn.collapse.Constructor = Collapse
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
/* COLLAPSIBLE DATA-API
|
|
562
|
+
* ==================== */
|
|
563
|
+
|
|
564
|
+
$(function () {
|
|
565
|
+
$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
|
|
566
|
+
var $this = $(this), href
|
|
567
|
+
, target = $this.attr('data-target')
|
|
568
|
+
|| e.preventDefault()
|
|
569
|
+
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
|
|
570
|
+
, option = $(target).data('collapse') ? 'toggle' : $this.data()
|
|
571
|
+
$this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
|
|
572
|
+
$(target).collapse(option)
|
|
573
|
+
})
|
|
574
|
+
})
|
|
575
|
+
|
|
576
|
+
}(window.jQuery);/* ============================================================
|
|
577
|
+
* bootstrap-dropdown.js v2.1.1
|
|
578
|
+
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
|
579
|
+
* ============================================================
|
|
580
|
+
* Copyright 2012 Twitter, Inc.
|
|
581
|
+
*
|
|
582
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
583
|
+
* you may not use this file except in compliance with the License.
|
|
584
|
+
* You may obtain a copy of the License at
|
|
585
|
+
*
|
|
586
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
587
|
+
*
|
|
588
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
589
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
590
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
591
|
+
* See the License for the specific language governing permissions and
|
|
592
|
+
* limitations under the License.
|
|
593
|
+
* ============================================================ */
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
!function ($) {
|
|
597
|
+
|
|
598
|
+
"use strict"; // jshint ;_;
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
/* DROPDOWN CLASS DEFINITION
|
|
602
|
+
* ========================= */
|
|
603
|
+
|
|
604
|
+
var toggle = '[data-toggle=dropdown]'
|
|
605
|
+
, Dropdown = function (element) {
|
|
606
|
+
var $el = $(element).on('click.dropdown.data-api', this.toggle)
|
|
607
|
+
$('html').on('click.dropdown.data-api', function () {
|
|
608
|
+
$el.parent().removeClass('open')
|
|
609
|
+
})
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
Dropdown.prototype = {
|
|
613
|
+
|
|
614
|
+
constructor: Dropdown
|
|
615
|
+
|
|
616
|
+
, toggle: function (e) {
|
|
617
|
+
var $this = $(this)
|
|
618
|
+
, $parent
|
|
619
|
+
, isActive
|
|
620
|
+
|
|
621
|
+
if ($this.is('.disabled, :disabled')) return
|
|
622
|
+
|
|
623
|
+
$parent = getParent($this)
|
|
624
|
+
|
|
625
|
+
isActive = $parent.hasClass('open')
|
|
626
|
+
|
|
627
|
+
clearMenus()
|
|
628
|
+
|
|
629
|
+
if (!isActive) {
|
|
630
|
+
$parent.toggleClass('open')
|
|
631
|
+
$this.focus()
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
return false
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
, keydown: function (e) {
|
|
638
|
+
var $this
|
|
639
|
+
, $items
|
|
640
|
+
, $active
|
|
641
|
+
, $parent
|
|
642
|
+
, isActive
|
|
643
|
+
, index
|
|
644
|
+
|
|
645
|
+
if (!/(38|40|27)/.test(e.keyCode)) return
|
|
646
|
+
|
|
647
|
+
$this = $(this)
|
|
648
|
+
|
|
649
|
+
e.preventDefault()
|
|
650
|
+
e.stopPropagation()
|
|
651
|
+
|
|
652
|
+
if ($this.is('.disabled, :disabled')) return
|
|
653
|
+
|
|
654
|
+
$parent = getParent($this)
|
|
655
|
+
|
|
656
|
+
isActive = $parent.hasClass('open')
|
|
657
|
+
|
|
658
|
+
if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
|
|
659
|
+
|
|
660
|
+
$items = $('[role=menu] li:not(.divider) a', $parent)
|
|
661
|
+
|
|
662
|
+
if (!$items.length) return
|
|
663
|
+
|
|
664
|
+
index = $items.index($items.filter(':focus'))
|
|
665
|
+
|
|
666
|
+
if (e.keyCode == 38 && index > 0) index-- // up
|
|
667
|
+
if (e.keyCode == 40 && index < $items.length - 1) index++ // down
|
|
668
|
+
if (!~index) index = 0
|
|
669
|
+
|
|
670
|
+
$items
|
|
671
|
+
.eq(index)
|
|
672
|
+
.focus()
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
function clearMenus() {
|
|
678
|
+
getParent($(toggle))
|
|
679
|
+
.removeClass('open')
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
function getParent($this) {
|
|
683
|
+
var selector = $this.attr('data-target')
|
|
684
|
+
, $parent
|
|
685
|
+
|
|
686
|
+
if (!selector) {
|
|
687
|
+
selector = $this.attr('href')
|
|
688
|
+
selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
$parent = $(selector)
|
|
692
|
+
$parent.length || ($parent = $this.parent())
|
|
693
|
+
|
|
694
|
+
return $parent
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
/* DROPDOWN PLUGIN DEFINITION
|
|
699
|
+
* ========================== */
|
|
700
|
+
|
|
701
|
+
$.fn.dropdown = function (option) {
|
|
702
|
+
return this.each(function () {
|
|
703
|
+
var $this = $(this)
|
|
704
|
+
, data = $this.data('dropdown')
|
|
705
|
+
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
|
|
706
|
+
if (typeof option == 'string') data[option].call($this)
|
|
707
|
+
})
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
$.fn.dropdown.Constructor = Dropdown
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
|
714
|
+
* =================================== */
|
|
715
|
+
|
|
716
|
+
$(function () {
|
|
717
|
+
$('html')
|
|
718
|
+
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
|
|
719
|
+
$('body')
|
|
720
|
+
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
|
721
|
+
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
|
722
|
+
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
|
723
|
+
})
|
|
724
|
+
|
|
725
|
+
}(window.jQuery);/* =========================================================
|
|
726
|
+
* bootstrap-modal.js v2.1.1
|
|
727
|
+
* http://twitter.github.com/bootstrap/javascript.html#modals
|
|
728
|
+
* =========================================================
|
|
729
|
+
* Copyright 2012 Twitter, Inc.
|
|
730
|
+
*
|
|
731
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
732
|
+
* you may not use this file except in compliance with the License.
|
|
733
|
+
* You may obtain a copy of the License at
|
|
734
|
+
*
|
|
735
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
736
|
+
*
|
|
737
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
738
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
739
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
740
|
+
* See the License for the specific language governing permissions and
|
|
741
|
+
* limitations under the License.
|
|
742
|
+
* ========================================================= */
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
!function ($) {
|
|
746
|
+
|
|
747
|
+
"use strict"; // jshint ;_;
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
/* MODAL CLASS DEFINITION
|
|
751
|
+
* ====================== */
|
|
752
|
+
|
|
753
|
+
var Modal = function (element, options) {
|
|
754
|
+
this.options = options
|
|
755
|
+
this.$element = $(element)
|
|
756
|
+
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
|
|
757
|
+
this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
Modal.prototype = {
|
|
761
|
+
|
|
762
|
+
constructor: Modal
|
|
763
|
+
|
|
764
|
+
, toggle: function () {
|
|
765
|
+
return this[!this.isShown ? 'show' : 'hide']()
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
, show: function () {
|
|
769
|
+
var that = this
|
|
770
|
+
, e = $.Event('show')
|
|
771
|
+
|
|
772
|
+
this.$element.trigger(e)
|
|
773
|
+
|
|
774
|
+
if (this.isShown || e.isDefaultPrevented()) return
|
|
775
|
+
|
|
776
|
+
$('body').addClass('modal-open')
|
|
777
|
+
|
|
778
|
+
this.isShown = true
|
|
779
|
+
|
|
780
|
+
this.escape()
|
|
781
|
+
|
|
782
|
+
this.backdrop(function () {
|
|
783
|
+
var transition = $.support.transition && that.$element.hasClass('fade')
|
|
784
|
+
|
|
785
|
+
if (!that.$element.parent().length) {
|
|
786
|
+
that.$element.appendTo(document.body) //don't move modals dom position
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
that.$element
|
|
790
|
+
.show()
|
|
791
|
+
|
|
792
|
+
if (transition) {
|
|
793
|
+
that.$element[0].offsetWidth // force reflow
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
that.$element
|
|
797
|
+
.addClass('in')
|
|
798
|
+
.attr('aria-hidden', false)
|
|
799
|
+
.focus()
|
|
800
|
+
|
|
801
|
+
that.enforceFocus()
|
|
802
|
+
|
|
803
|
+
transition ?
|
|
804
|
+
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
|
805
|
+
that.$element.trigger('shown')
|
|
806
|
+
|
|
807
|
+
})
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
, hide: function (e) {
|
|
811
|
+
e && e.preventDefault()
|
|
812
|
+
|
|
813
|
+
var that = this
|
|
814
|
+
|
|
815
|
+
e = $.Event('hide')
|
|
816
|
+
|
|
817
|
+
this.$element.trigger(e)
|
|
818
|
+
|
|
819
|
+
if (!this.isShown || e.isDefaultPrevented()) return
|
|
820
|
+
|
|
821
|
+
this.isShown = false
|
|
822
|
+
|
|
823
|
+
$('body').removeClass('modal-open')
|
|
824
|
+
|
|
825
|
+
this.escape()
|
|
826
|
+
|
|
827
|
+
$(document).off('focusin.modal')
|
|
828
|
+
|
|
829
|
+
this.$element
|
|
830
|
+
.removeClass('in')
|
|
831
|
+
.attr('aria-hidden', true)
|
|
832
|
+
|
|
833
|
+
$.support.transition && this.$element.hasClass('fade') ?
|
|
834
|
+
this.hideWithTransition() :
|
|
835
|
+
this.hideModal()
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
, enforceFocus: function () {
|
|
839
|
+
var that = this
|
|
840
|
+
$(document).on('focusin.modal', function (e) {
|
|
841
|
+
if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
|
|
842
|
+
that.$element.focus()
|
|
843
|
+
}
|
|
844
|
+
})
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
, escape: function () {
|
|
848
|
+
var that = this
|
|
849
|
+
if (this.isShown && this.options.keyboard) {
|
|
850
|
+
this.$element.on('keyup.dismiss.modal', function ( e ) {
|
|
851
|
+
e.which == 27 && that.hide()
|
|
852
|
+
})
|
|
853
|
+
} else if (!this.isShown) {
|
|
854
|
+
this.$element.off('keyup.dismiss.modal')
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
, hideWithTransition: function () {
|
|
859
|
+
var that = this
|
|
860
|
+
, timeout = setTimeout(function () {
|
|
861
|
+
that.$element.off($.support.transition.end)
|
|
862
|
+
that.hideModal()
|
|
863
|
+
}, 500)
|
|
864
|
+
|
|
865
|
+
this.$element.one($.support.transition.end, function () {
|
|
866
|
+
clearTimeout(timeout)
|
|
867
|
+
that.hideModal()
|
|
868
|
+
})
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
, hideModal: function (that) {
|
|
872
|
+
this.$element
|
|
873
|
+
.hide()
|
|
874
|
+
.trigger('hidden')
|
|
875
|
+
|
|
876
|
+
this.backdrop()
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
, removeBackdrop: function () {
|
|
880
|
+
this.$backdrop.remove()
|
|
881
|
+
this.$backdrop = null
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
, backdrop: function (callback) {
|
|
885
|
+
var that = this
|
|
886
|
+
, animate = this.$element.hasClass('fade') ? 'fade' : ''
|
|
887
|
+
|
|
888
|
+
if (this.isShown && this.options.backdrop) {
|
|
889
|
+
var doAnimate = $.support.transition && animate
|
|
890
|
+
|
|
891
|
+
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
|
|
892
|
+
.appendTo(document.body)
|
|
893
|
+
|
|
894
|
+
if (this.options.backdrop != 'static') {
|
|
895
|
+
this.$backdrop.click($.proxy(this.hide, this))
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
|
|
899
|
+
|
|
900
|
+
this.$backdrop.addClass('in')
|
|
901
|
+
|
|
902
|
+
doAnimate ?
|
|
903
|
+
this.$backdrop.one($.support.transition.end, callback) :
|
|
904
|
+
callback()
|
|
905
|
+
|
|
906
|
+
} else if (!this.isShown && this.$backdrop) {
|
|
907
|
+
this.$backdrop.removeClass('in')
|
|
908
|
+
|
|
909
|
+
$.support.transition && this.$element.hasClass('fade')?
|
|
910
|
+
this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
|
|
911
|
+
this.removeBackdrop()
|
|
912
|
+
|
|
913
|
+
} else if (callback) {
|
|
914
|
+
callback()
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
/* MODAL PLUGIN DEFINITION
|
|
921
|
+
* ======================= */
|
|
922
|
+
|
|
923
|
+
$.fn.modal = function (option) {
|
|
924
|
+
return this.each(function () {
|
|
925
|
+
var $this = $(this)
|
|
926
|
+
, data = $this.data('modal')
|
|
927
|
+
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
|
|
928
|
+
if (!data) $this.data('modal', (data = new Modal(this, options)))
|
|
929
|
+
if (typeof option == 'string') data[option]()
|
|
930
|
+
else if (options.show) data.show()
|
|
931
|
+
})
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
$.fn.modal.defaults = {
|
|
935
|
+
backdrop: true
|
|
936
|
+
, keyboard: true
|
|
937
|
+
, show: true
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
$.fn.modal.Constructor = Modal
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
/* MODAL DATA-API
|
|
944
|
+
* ============== */
|
|
945
|
+
|
|
946
|
+
$(function () {
|
|
947
|
+
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
|
|
948
|
+
var $this = $(this)
|
|
949
|
+
, href = $this.attr('href')
|
|
950
|
+
, $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
|
|
951
|
+
, option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
|
|
952
|
+
|
|
953
|
+
e.preventDefault()
|
|
954
|
+
|
|
955
|
+
$target
|
|
956
|
+
.modal(option)
|
|
957
|
+
.one('hide', function () {
|
|
958
|
+
$this.focus()
|
|
959
|
+
})
|
|
960
|
+
})
|
|
961
|
+
})
|
|
962
|
+
|
|
963
|
+
}(window.jQuery);/* ===========================================================
|
|
964
|
+
* bootstrap-tooltip.js v2.1.1
|
|
965
|
+
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
|
966
|
+
* Inspired by the original jQuery.tipsy by Jason Frame
|
|
967
|
+
* ===========================================================
|
|
968
|
+
* Copyright 2012 Twitter, Inc.
|
|
969
|
+
*
|
|
970
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
971
|
+
* you may not use this file except in compliance with the License.
|
|
972
|
+
* You may obtain a copy of the License at
|
|
973
|
+
*
|
|
974
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
975
|
+
*
|
|
976
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
977
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
978
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
979
|
+
* See the License for the specific language governing permissions and
|
|
980
|
+
* limitations under the License.
|
|
981
|
+
* ========================================================== */
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
!function ($) {
|
|
985
|
+
|
|
986
|
+
"use strict"; // jshint ;_;
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
/* TOOLTIP PUBLIC CLASS DEFINITION
|
|
990
|
+
* =============================== */
|
|
991
|
+
|
|
992
|
+
var Tooltip = function (element, options) {
|
|
993
|
+
this.init('tooltip', element, options)
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
Tooltip.prototype = {
|
|
997
|
+
|
|
998
|
+
constructor: Tooltip
|
|
999
|
+
|
|
1000
|
+
, init: function (type, element, options) {
|
|
1001
|
+
var eventIn
|
|
1002
|
+
, eventOut
|
|
1003
|
+
|
|
1004
|
+
this.type = type
|
|
1005
|
+
this.$element = $(element)
|
|
1006
|
+
this.options = this.getOptions(options)
|
|
1007
|
+
this.enabled = true
|
|
1008
|
+
|
|
1009
|
+
if (this.options.trigger == 'click') {
|
|
1010
|
+
this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
|
|
1011
|
+
} else if (this.options.trigger != 'manual') {
|
|
1012
|
+
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
|
|
1013
|
+
eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
|
|
1014
|
+
this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
|
|
1015
|
+
this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
this.options.selector ?
|
|
1019
|
+
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
|
|
1020
|
+
this.fixTitle()
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
, getOptions: function (options) {
|
|
1024
|
+
options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
|
|
1025
|
+
|
|
1026
|
+
if (options.delay && typeof options.delay == 'number') {
|
|
1027
|
+
options.delay = {
|
|
1028
|
+
show: options.delay
|
|
1029
|
+
, hide: options.delay
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
return options
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
, enter: function (e) {
|
|
1037
|
+
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
|
1038
|
+
|
|
1039
|
+
if (!self.options.delay || !self.options.delay.show) return self.show()
|
|
1040
|
+
|
|
1041
|
+
clearTimeout(this.timeout)
|
|
1042
|
+
self.hoverState = 'in'
|
|
1043
|
+
this.timeout = setTimeout(function() {
|
|
1044
|
+
if (self.hoverState == 'in') self.show()
|
|
1045
|
+
}, self.options.delay.show)
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
, leave: function (e) {
|
|
1049
|
+
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
|
|
1050
|
+
|
|
1051
|
+
if (this.timeout) clearTimeout(this.timeout)
|
|
1052
|
+
if (!self.options.delay || !self.options.delay.hide) return self.hide()
|
|
1053
|
+
|
|
1054
|
+
self.hoverState = 'out'
|
|
1055
|
+
this.timeout = setTimeout(function() {
|
|
1056
|
+
if (self.hoverState == 'out') self.hide()
|
|
1057
|
+
}, self.options.delay.hide)
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
, show: function () {
|
|
1061
|
+
var $tip
|
|
1062
|
+
, inside
|
|
1063
|
+
, pos
|
|
1064
|
+
, actualWidth
|
|
1065
|
+
, actualHeight
|
|
1066
|
+
, placement
|
|
1067
|
+
, tp
|
|
1068
|
+
|
|
1069
|
+
if (this.hasContent() && this.enabled) {
|
|
1070
|
+
$tip = this.tip()
|
|
1071
|
+
this.setContent()
|
|
1072
|
+
|
|
1073
|
+
if (this.options.animation) {
|
|
1074
|
+
$tip.addClass('fade')
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
placement = typeof this.options.placement == 'function' ?
|
|
1078
|
+
this.options.placement.call(this, $tip[0], this.$element[0]) :
|
|
1079
|
+
this.options.placement
|
|
1080
|
+
|
|
1081
|
+
inside = /in/.test(placement)
|
|
1082
|
+
|
|
1083
|
+
$tip
|
|
1084
|
+
.remove()
|
|
1085
|
+
.css({ top: 0, left: 0, display: 'block' })
|
|
1086
|
+
.appendTo(inside ? this.$element : document.body)
|
|
1087
|
+
|
|
1088
|
+
pos = this.getPosition(inside)
|
|
1089
|
+
|
|
1090
|
+
actualWidth = $tip[0].offsetWidth
|
|
1091
|
+
actualHeight = $tip[0].offsetHeight
|
|
1092
|
+
|
|
1093
|
+
switch (inside ? placement.split(' ')[1] : placement) {
|
|
1094
|
+
case 'bottom':
|
|
1095
|
+
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
|
|
1096
|
+
break
|
|
1097
|
+
case 'top':
|
|
1098
|
+
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
|
|
1099
|
+
break
|
|
1100
|
+
case 'left':
|
|
1101
|
+
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
|
|
1102
|
+
break
|
|
1103
|
+
case 'right':
|
|
1104
|
+
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
|
|
1105
|
+
break
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
$tip
|
|
1109
|
+
.css(tp)
|
|
1110
|
+
.addClass(placement)
|
|
1111
|
+
.addClass('in')
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
, setContent: function () {
|
|
1116
|
+
var $tip = this.tip()
|
|
1117
|
+
, title = this.getTitle()
|
|
1118
|
+
|
|
1119
|
+
$tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
|
|
1120
|
+
$tip.removeClass('fade in top bottom left right')
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
, hide: function () {
|
|
1124
|
+
var that = this
|
|
1125
|
+
, $tip = this.tip()
|
|
1126
|
+
|
|
1127
|
+
$tip.removeClass('in')
|
|
1128
|
+
|
|
1129
|
+
function removeWithAnimation() {
|
|
1130
|
+
var timeout = setTimeout(function () {
|
|
1131
|
+
$tip.off($.support.transition.end).remove()
|
|
1132
|
+
}, 500)
|
|
1133
|
+
|
|
1134
|
+
$tip.one($.support.transition.end, function () {
|
|
1135
|
+
clearTimeout(timeout)
|
|
1136
|
+
$tip.remove()
|
|
1137
|
+
})
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
$.support.transition && this.$tip.hasClass('fade') ?
|
|
1141
|
+
removeWithAnimation() :
|
|
1142
|
+
$tip.remove()
|
|
1143
|
+
|
|
1144
|
+
return this
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
, fixTitle: function () {
|
|
1148
|
+
var $e = this.$element
|
|
1149
|
+
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
|
|
1150
|
+
$e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
, hasContent: function () {
|
|
1155
|
+
return this.getTitle()
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
, getPosition: function (inside) {
|
|
1159
|
+
return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
|
|
1160
|
+
width: this.$element[0].offsetWidth
|
|
1161
|
+
, height: this.$element[0].offsetHeight
|
|
1162
|
+
})
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
, getTitle: function () {
|
|
1166
|
+
var title
|
|
1167
|
+
, $e = this.$element
|
|
1168
|
+
, o = this.options
|
|
1169
|
+
|
|
1170
|
+
title = $e.attr('data-original-title')
|
|
1171
|
+
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
|
|
1172
|
+
|
|
1173
|
+
return title
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
, tip: function () {
|
|
1177
|
+
return this.$tip = this.$tip || $(this.options.template)
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
, validate: function () {
|
|
1181
|
+
if (!this.$element[0].parentNode) {
|
|
1182
|
+
this.hide()
|
|
1183
|
+
this.$element = null
|
|
1184
|
+
this.options = null
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
, enable: function () {
|
|
1189
|
+
this.enabled = true
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
, disable: function () {
|
|
1193
|
+
this.enabled = false
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
, toggleEnabled: function () {
|
|
1197
|
+
this.enabled = !this.enabled
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
, toggle: function () {
|
|
1201
|
+
this[this.tip().hasClass('in') ? 'hide' : 'show']()
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
, destroy: function () {
|
|
1205
|
+
this.hide().$element.off('.' + this.type).removeData(this.type)
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
/* TOOLTIP PLUGIN DEFINITION
|
|
1212
|
+
* ========================= */
|
|
1213
|
+
|
|
1214
|
+
$.fn.tooltip = function ( option ) {
|
|
1215
|
+
return this.each(function () {
|
|
1216
|
+
var $this = $(this)
|
|
1217
|
+
, data = $this.data('tooltip')
|
|
1218
|
+
, options = typeof option == 'object' && option
|
|
1219
|
+
if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
|
|
1220
|
+
if (typeof option == 'string') data[option]()
|
|
1221
|
+
})
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
$.fn.tooltip.Constructor = Tooltip
|
|
1225
|
+
|
|
1226
|
+
$.fn.tooltip.defaults = {
|
|
1227
|
+
animation: true
|
|
1228
|
+
, placement: 'top'
|
|
1229
|
+
, selector: false
|
|
1230
|
+
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
|
|
1231
|
+
, trigger: 'hover'
|
|
1232
|
+
, title: ''
|
|
1233
|
+
, delay: 0
|
|
1234
|
+
, html: true
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
}(window.jQuery);
|
|
1238
|
+
/* ===========================================================
|
|
1239
|
+
* bootstrap-popover.js v2.1.1
|
|
1240
|
+
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
|
1241
|
+
* ===========================================================
|
|
1242
|
+
* Copyright 2012 Twitter, Inc.
|
|
1243
|
+
*
|
|
1244
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1245
|
+
* you may not use this file except in compliance with the License.
|
|
1246
|
+
* You may obtain a copy of the License at
|
|
1247
|
+
*
|
|
1248
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1249
|
+
*
|
|
1250
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1251
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1252
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1253
|
+
* See the License for the specific language governing permissions and
|
|
1254
|
+
* limitations under the License.
|
|
1255
|
+
* =========================================================== */
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
!function ($) {
|
|
1259
|
+
|
|
1260
|
+
"use strict"; // jshint ;_;
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
/* POPOVER PUBLIC CLASS DEFINITION
|
|
1264
|
+
* =============================== */
|
|
1265
|
+
|
|
1266
|
+
var Popover = function (element, options) {
|
|
1267
|
+
this.init('popover', element, options)
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
|
|
1271
|
+
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
|
|
1272
|
+
========================================== */
|
|
1273
|
+
|
|
1274
|
+
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
|
|
1275
|
+
|
|
1276
|
+
constructor: Popover
|
|
1277
|
+
|
|
1278
|
+
, setContent: function () {
|
|
1279
|
+
var $tip = this.tip()
|
|
1280
|
+
, title = this.getTitle()
|
|
1281
|
+
, content = this.getContent()
|
|
1282
|
+
|
|
1283
|
+
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
|
|
1284
|
+
$tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
|
|
1285
|
+
|
|
1286
|
+
$tip.removeClass('fade top bottom left right in')
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
, hasContent: function () {
|
|
1290
|
+
return this.getTitle() || this.getContent()
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
, getContent: function () {
|
|
1294
|
+
var content
|
|
1295
|
+
, $e = this.$element
|
|
1296
|
+
, o = this.options
|
|
1297
|
+
|
|
1298
|
+
content = $e.attr('data-content')
|
|
1299
|
+
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
|
|
1300
|
+
|
|
1301
|
+
return content
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
, tip: function () {
|
|
1305
|
+
if (!this.$tip) {
|
|
1306
|
+
this.$tip = $(this.options.template)
|
|
1307
|
+
}
|
|
1308
|
+
return this.$tip
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
, destroy: function () {
|
|
1312
|
+
this.hide().$element.off('.' + this.type).removeData(this.type)
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
})
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
/* POPOVER PLUGIN DEFINITION
|
|
1319
|
+
* ======================= */
|
|
1320
|
+
|
|
1321
|
+
$.fn.popover = function (option) {
|
|
1322
|
+
return this.each(function () {
|
|
1323
|
+
var $this = $(this)
|
|
1324
|
+
, data = $this.data('popover')
|
|
1325
|
+
, options = typeof option == 'object' && option
|
|
1326
|
+
if (!data) $this.data('popover', (data = new Popover(this, options)))
|
|
1327
|
+
if (typeof option == 'string') data[option]()
|
|
1328
|
+
})
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
$.fn.popover.Constructor = Popover
|
|
1332
|
+
|
|
1333
|
+
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
|
|
1334
|
+
placement: 'right'
|
|
1335
|
+
, trigger: 'click'
|
|
1336
|
+
, content: ''
|
|
1337
|
+
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
|
|
1338
|
+
})
|
|
1339
|
+
|
|
1340
|
+
}(window.jQuery);/* =============================================================
|
|
1341
|
+
* bootstrap-scrollspy.js v2.1.1
|
|
1342
|
+
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
|
1343
|
+
* =============================================================
|
|
1344
|
+
* Copyright 2012 Twitter, Inc.
|
|
1345
|
+
*
|
|
1346
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1347
|
+
* you may not use this file except in compliance with the License.
|
|
1348
|
+
* You may obtain a copy of the License at
|
|
1349
|
+
*
|
|
1350
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1351
|
+
*
|
|
1352
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1353
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1354
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1355
|
+
* See the License for the specific language governing permissions and
|
|
1356
|
+
* limitations under the License.
|
|
1357
|
+
* ============================================================== */
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
!function ($) {
|
|
1361
|
+
|
|
1362
|
+
"use strict"; // jshint ;_;
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
/* SCROLLSPY CLASS DEFINITION
|
|
1366
|
+
* ========================== */
|
|
1367
|
+
|
|
1368
|
+
function ScrollSpy(element, options) {
|
|
1369
|
+
var process = $.proxy(this.process, this)
|
|
1370
|
+
, $element = $(element).is('body') ? $(window) : $(element)
|
|
1371
|
+
, href
|
|
1372
|
+
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
|
|
1373
|
+
this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
|
|
1374
|
+
this.selector = (this.options.target
|
|
1375
|
+
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|
|
1376
|
+
|| '') + ' .nav li > a'
|
|
1377
|
+
this.$body = $('body')
|
|
1378
|
+
this.refresh()
|
|
1379
|
+
this.process()
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
ScrollSpy.prototype = {
|
|
1383
|
+
|
|
1384
|
+
constructor: ScrollSpy
|
|
1385
|
+
|
|
1386
|
+
, refresh: function () {
|
|
1387
|
+
var self = this
|
|
1388
|
+
, $targets
|
|
1389
|
+
|
|
1390
|
+
this.offsets = $([])
|
|
1391
|
+
this.targets = $([])
|
|
1392
|
+
|
|
1393
|
+
$targets = this.$body
|
|
1394
|
+
.find(this.selector)
|
|
1395
|
+
.map(function () {
|
|
1396
|
+
var $el = $(this)
|
|
1397
|
+
, href = $el.data('target') || $el.attr('href')
|
|
1398
|
+
, $href = /^#\w/.test(href) && $(href)
|
|
1399
|
+
return ( $href
|
|
1400
|
+
&& $href.length
|
|
1401
|
+
&& [[ $href.position().top, href ]] ) || null
|
|
1402
|
+
})
|
|
1403
|
+
.sort(function (a, b) { return a[0] - b[0] })
|
|
1404
|
+
.each(function () {
|
|
1405
|
+
self.offsets.push(this[0])
|
|
1406
|
+
self.targets.push(this[1])
|
|
1407
|
+
})
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
, process: function () {
|
|
1411
|
+
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
|
|
1412
|
+
, scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
|
|
1413
|
+
, maxScroll = scrollHeight - this.$scrollElement.height()
|
|
1414
|
+
, offsets = this.offsets
|
|
1415
|
+
, targets = this.targets
|
|
1416
|
+
, activeTarget = this.activeTarget
|
|
1417
|
+
, i
|
|
1418
|
+
|
|
1419
|
+
if (scrollTop >= maxScroll) {
|
|
1420
|
+
return activeTarget != (i = targets.last()[0])
|
|
1421
|
+
&& this.activate ( i )
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
for (i = offsets.length; i--;) {
|
|
1425
|
+
activeTarget != targets[i]
|
|
1426
|
+
&& scrollTop >= offsets[i]
|
|
1427
|
+
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
|
|
1428
|
+
&& this.activate( targets[i] )
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
, activate: function (target) {
|
|
1433
|
+
var active
|
|
1434
|
+
, selector
|
|
1435
|
+
|
|
1436
|
+
this.activeTarget = target
|
|
1437
|
+
|
|
1438
|
+
$(this.selector)
|
|
1439
|
+
.parent('.active')
|
|
1440
|
+
.removeClass('active')
|
|
1441
|
+
|
|
1442
|
+
selector = this.selector
|
|
1443
|
+
+ '[data-target="' + target + '"],'
|
|
1444
|
+
+ this.selector + '[href="' + target + '"]'
|
|
1445
|
+
|
|
1446
|
+
active = $(selector)
|
|
1447
|
+
.parent('li')
|
|
1448
|
+
.addClass('active')
|
|
1449
|
+
|
|
1450
|
+
if (active.parent('.dropdown-menu').length) {
|
|
1451
|
+
active = active.closest('li.dropdown').addClass('active')
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
active.trigger('activate')
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
/* SCROLLSPY PLUGIN DEFINITION
|
|
1461
|
+
* =========================== */
|
|
1462
|
+
|
|
1463
|
+
$.fn.scrollspy = function (option) {
|
|
1464
|
+
return this.each(function () {
|
|
1465
|
+
var $this = $(this)
|
|
1466
|
+
, data = $this.data('scrollspy')
|
|
1467
|
+
, options = typeof option == 'object' && option
|
|
1468
|
+
if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
|
|
1469
|
+
if (typeof option == 'string') data[option]()
|
|
1470
|
+
})
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
$.fn.scrollspy.Constructor = ScrollSpy
|
|
1474
|
+
|
|
1475
|
+
$.fn.scrollspy.defaults = {
|
|
1476
|
+
offset: 10
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
/* SCROLLSPY DATA-API
|
|
1481
|
+
* ================== */
|
|
1482
|
+
|
|
1483
|
+
$(window).on('load', function () {
|
|
1484
|
+
$('[data-spy="scroll"]').each(function () {
|
|
1485
|
+
var $spy = $(this)
|
|
1486
|
+
$spy.scrollspy($spy.data())
|
|
1487
|
+
})
|
|
1488
|
+
})
|
|
1489
|
+
|
|
1490
|
+
}(window.jQuery);/* ========================================================
|
|
1491
|
+
* bootstrap-tab.js v2.1.1
|
|
1492
|
+
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
|
1493
|
+
* ========================================================
|
|
1494
|
+
* Copyright 2012 Twitter, Inc.
|
|
1495
|
+
*
|
|
1496
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1497
|
+
* you may not use this file except in compliance with the License.
|
|
1498
|
+
* You may obtain a copy of the License at
|
|
1499
|
+
*
|
|
1500
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1501
|
+
*
|
|
1502
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1503
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1504
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1505
|
+
* See the License for the specific language governing permissions and
|
|
1506
|
+
* limitations under the License.
|
|
1507
|
+
* ======================================================== */
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
!function ($) {
|
|
1511
|
+
|
|
1512
|
+
"use strict"; // jshint ;_;
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
/* TAB CLASS DEFINITION
|
|
1516
|
+
* ==================== */
|
|
1517
|
+
|
|
1518
|
+
var Tab = function (element) {
|
|
1519
|
+
this.element = $(element)
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
Tab.prototype = {
|
|
1523
|
+
|
|
1524
|
+
constructor: Tab
|
|
1525
|
+
|
|
1526
|
+
, show: function () {
|
|
1527
|
+
var $this = this.element
|
|
1528
|
+
, $ul = $this.closest('ul:not(.dropdown-menu)')
|
|
1529
|
+
, selector = $this.attr('data-target')
|
|
1530
|
+
, previous
|
|
1531
|
+
, $target
|
|
1532
|
+
, e
|
|
1533
|
+
|
|
1534
|
+
if (!selector) {
|
|
1535
|
+
selector = $this.attr('href')
|
|
1536
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
if ( $this.parent('li').hasClass('active') ) return
|
|
1540
|
+
|
|
1541
|
+
previous = $ul.find('.active a').last()[0]
|
|
1542
|
+
|
|
1543
|
+
e = $.Event('show', {
|
|
1544
|
+
relatedTarget: previous
|
|
1545
|
+
})
|
|
1546
|
+
|
|
1547
|
+
$this.trigger(e)
|
|
1548
|
+
|
|
1549
|
+
if (e.isDefaultPrevented()) return
|
|
1550
|
+
|
|
1551
|
+
$target = $(selector)
|
|
1552
|
+
|
|
1553
|
+
this.activate($this.parent('li'), $ul)
|
|
1554
|
+
this.activate($target, $target.parent(), function () {
|
|
1555
|
+
$this.trigger({
|
|
1556
|
+
type: 'shown'
|
|
1557
|
+
, relatedTarget: previous
|
|
1558
|
+
})
|
|
1559
|
+
})
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
, activate: function ( element, container, callback) {
|
|
1563
|
+
var $active = container.find('> .active')
|
|
1564
|
+
, transition = callback
|
|
1565
|
+
&& $.support.transition
|
|
1566
|
+
&& $active.hasClass('fade')
|
|
1567
|
+
|
|
1568
|
+
function next() {
|
|
1569
|
+
$active
|
|
1570
|
+
.removeClass('active')
|
|
1571
|
+
.find('> .dropdown-menu > .active')
|
|
1572
|
+
.removeClass('active')
|
|
1573
|
+
|
|
1574
|
+
element.addClass('active')
|
|
1575
|
+
|
|
1576
|
+
if (transition) {
|
|
1577
|
+
element[0].offsetWidth // reflow for transition
|
|
1578
|
+
element.addClass('in')
|
|
1579
|
+
} else {
|
|
1580
|
+
element.removeClass('fade')
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
if ( element.parent('.dropdown-menu') ) {
|
|
1584
|
+
element.closest('li.dropdown').addClass('active')
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
callback && callback()
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
transition ?
|
|
1591
|
+
$active.one($.support.transition.end, next) :
|
|
1592
|
+
next()
|
|
1593
|
+
|
|
1594
|
+
$active.removeClass('in')
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
|
|
1599
|
+
/* TAB PLUGIN DEFINITION
|
|
1600
|
+
* ===================== */
|
|
1601
|
+
|
|
1602
|
+
$.fn.tab = function ( option ) {
|
|
1603
|
+
return this.each(function () {
|
|
1604
|
+
var $this = $(this)
|
|
1605
|
+
, data = $this.data('tab')
|
|
1606
|
+
if (!data) $this.data('tab', (data = new Tab(this)))
|
|
1607
|
+
if (typeof option == 'string') data[option]()
|
|
1608
|
+
})
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
$.fn.tab.Constructor = Tab
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
/* TAB DATA-API
|
|
1615
|
+
* ============ */
|
|
1616
|
+
|
|
1617
|
+
$(function () {
|
|
1618
|
+
$('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
|
|
1619
|
+
e.preventDefault()
|
|
1620
|
+
$(this).tab('show')
|
|
1621
|
+
})
|
|
1622
|
+
})
|
|
1623
|
+
|
|
1624
|
+
}(window.jQuery);/* =============================================================
|
|
1625
|
+
* bootstrap-typeahead.js v2.1.1
|
|
1626
|
+
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
|
1627
|
+
* =============================================================
|
|
1628
|
+
* Copyright 2012 Twitter, Inc.
|
|
1629
|
+
*
|
|
1630
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1631
|
+
* you may not use this file except in compliance with the License.
|
|
1632
|
+
* You may obtain a copy of the License at
|
|
1633
|
+
*
|
|
1634
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1635
|
+
*
|
|
1636
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1637
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1638
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1639
|
+
* See the License for the specific language governing permissions and
|
|
1640
|
+
* limitations under the License.
|
|
1641
|
+
* ============================================================ */
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
!function($){
|
|
1645
|
+
|
|
1646
|
+
"use strict"; // jshint ;_;
|
|
1647
|
+
|
|
1648
|
+
|
|
1649
|
+
/* TYPEAHEAD PUBLIC CLASS DEFINITION
|
|
1650
|
+
* ================================= */
|
|
1651
|
+
|
|
1652
|
+
var Typeahead = function (element, options) {
|
|
1653
|
+
this.$element = $(element)
|
|
1654
|
+
this.options = $.extend({}, $.fn.typeahead.defaults, options)
|
|
1655
|
+
this.matcher = this.options.matcher || this.matcher
|
|
1656
|
+
this.sorter = this.options.sorter || this.sorter
|
|
1657
|
+
this.highlighter = this.options.highlighter || this.highlighter
|
|
1658
|
+
this.updater = this.options.updater || this.updater
|
|
1659
|
+
this.$menu = $(this.options.menu).appendTo('body')
|
|
1660
|
+
this.source = this.options.source
|
|
1661
|
+
this.shown = false
|
|
1662
|
+
this.listen()
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
Typeahead.prototype = {
|
|
1666
|
+
|
|
1667
|
+
constructor: Typeahead
|
|
1668
|
+
|
|
1669
|
+
, select: function () {
|
|
1670
|
+
var val = this.$menu.find('.active').attr('data-value')
|
|
1671
|
+
this.$element
|
|
1672
|
+
.val(this.updater(val))
|
|
1673
|
+
.change()
|
|
1674
|
+
return this.hide()
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
, updater: function (item) {
|
|
1678
|
+
return item
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
, show: function () {
|
|
1682
|
+
var pos = $.extend({}, this.$element.offset(), {
|
|
1683
|
+
height: this.$element[0].offsetHeight
|
|
1684
|
+
})
|
|
1685
|
+
|
|
1686
|
+
this.$menu.css({
|
|
1687
|
+
top: pos.top + pos.height
|
|
1688
|
+
, left: pos.left
|
|
1689
|
+
})
|
|
1690
|
+
|
|
1691
|
+
this.$menu.show()
|
|
1692
|
+
this.shown = true
|
|
1693
|
+
return this
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
, hide: function () {
|
|
1697
|
+
this.$menu.hide()
|
|
1698
|
+
this.shown = false
|
|
1699
|
+
return this
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
, lookup: function (event) {
|
|
1703
|
+
var items
|
|
1704
|
+
|
|
1705
|
+
this.query = this.$element.val()
|
|
1706
|
+
|
|
1707
|
+
if (!this.query || this.query.length < this.options.minLength) {
|
|
1708
|
+
return this.shown ? this.hide() : this
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
|
|
1712
|
+
|
|
1713
|
+
return items ? this.process(items) : this
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
, process: function (items) {
|
|
1717
|
+
var that = this
|
|
1718
|
+
|
|
1719
|
+
items = $.grep(items, function (item) {
|
|
1720
|
+
return that.matcher(item)
|
|
1721
|
+
})
|
|
1722
|
+
|
|
1723
|
+
items = this.sorter(items)
|
|
1724
|
+
|
|
1725
|
+
if (!items.length) {
|
|
1726
|
+
return this.shown ? this.hide() : this
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
return this.render(items.slice(0, this.options.items)).show()
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
, matcher: function (item) {
|
|
1733
|
+
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
, sorter: function (items) {
|
|
1737
|
+
var beginswith = []
|
|
1738
|
+
, caseSensitive = []
|
|
1739
|
+
, caseInsensitive = []
|
|
1740
|
+
, item
|
|
1741
|
+
|
|
1742
|
+
while (item = items.shift()) {
|
|
1743
|
+
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
|
|
1744
|
+
else if (~item.indexOf(this.query)) caseSensitive.push(item)
|
|
1745
|
+
else caseInsensitive.push(item)
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
return beginswith.concat(caseSensitive, caseInsensitive)
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
, highlighter: function (item) {
|
|
1752
|
+
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
|
|
1753
|
+
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
|
|
1754
|
+
return '<strong>' + match + '</strong>'
|
|
1755
|
+
})
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
, render: function (items) {
|
|
1759
|
+
var that = this
|
|
1760
|
+
|
|
1761
|
+
items = $(items).map(function (i, item) {
|
|
1762
|
+
i = $(that.options.item).attr('data-value', item)
|
|
1763
|
+
i.find('a').html(that.highlighter(item))
|
|
1764
|
+
return i[0]
|
|
1765
|
+
})
|
|
1766
|
+
|
|
1767
|
+
items.first().addClass('active')
|
|
1768
|
+
this.$menu.html(items)
|
|
1769
|
+
return this
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
, next: function (event) {
|
|
1773
|
+
var active = this.$menu.find('.active').removeClass('active')
|
|
1774
|
+
, next = active.next()
|
|
1775
|
+
|
|
1776
|
+
if (!next.length) {
|
|
1777
|
+
next = $(this.$menu.find('li')[0])
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
next.addClass('active')
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
, prev: function (event) {
|
|
1784
|
+
var active = this.$menu.find('.active').removeClass('active')
|
|
1785
|
+
, prev = active.prev()
|
|
1786
|
+
|
|
1787
|
+
if (!prev.length) {
|
|
1788
|
+
prev = this.$menu.find('li').last()
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
prev.addClass('active')
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
, listen: function () {
|
|
1795
|
+
this.$element
|
|
1796
|
+
.on('blur', $.proxy(this.blur, this))
|
|
1797
|
+
.on('keypress', $.proxy(this.keypress, this))
|
|
1798
|
+
.on('keyup', $.proxy(this.keyup, this))
|
|
1799
|
+
|
|
1800
|
+
if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
|
|
1801
|
+
this.$element.on('keydown', $.proxy(this.keydown, this))
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
this.$menu
|
|
1805
|
+
.on('click', $.proxy(this.click, this))
|
|
1806
|
+
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
, move: function (e) {
|
|
1810
|
+
if (!this.shown) return
|
|
1811
|
+
|
|
1812
|
+
switch(e.keyCode) {
|
|
1813
|
+
case 9: // tab
|
|
1814
|
+
case 13: // enter
|
|
1815
|
+
case 27: // escape
|
|
1816
|
+
e.preventDefault()
|
|
1817
|
+
break
|
|
1818
|
+
|
|
1819
|
+
case 38: // up arrow
|
|
1820
|
+
e.preventDefault()
|
|
1821
|
+
this.prev()
|
|
1822
|
+
break
|
|
1823
|
+
|
|
1824
|
+
case 40: // down arrow
|
|
1825
|
+
e.preventDefault()
|
|
1826
|
+
this.next()
|
|
1827
|
+
break
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
e.stopPropagation()
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
, keydown: function (e) {
|
|
1834
|
+
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
|
|
1835
|
+
this.move(e)
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
, keypress: function (e) {
|
|
1839
|
+
if (this.suppressKeyPressRepeat) return
|
|
1840
|
+
this.move(e)
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
, keyup: function (e) {
|
|
1844
|
+
switch(e.keyCode) {
|
|
1845
|
+
case 40: // down arrow
|
|
1846
|
+
case 38: // up arrow
|
|
1847
|
+
break
|
|
1848
|
+
|
|
1849
|
+
case 9: // tab
|
|
1850
|
+
case 13: // enter
|
|
1851
|
+
if (!this.shown) return
|
|
1852
|
+
this.select()
|
|
1853
|
+
break
|
|
1854
|
+
|
|
1855
|
+
case 27: // escape
|
|
1856
|
+
if (!this.shown) return
|
|
1857
|
+
this.hide()
|
|
1858
|
+
break
|
|
1859
|
+
|
|
1860
|
+
default:
|
|
1861
|
+
this.lookup()
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
e.stopPropagation()
|
|
1865
|
+
e.preventDefault()
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
, blur: function (e) {
|
|
1869
|
+
var that = this
|
|
1870
|
+
setTimeout(function () { that.hide() }, 150)
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
, click: function (e) {
|
|
1874
|
+
e.stopPropagation()
|
|
1875
|
+
e.preventDefault()
|
|
1876
|
+
this.select()
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
, mouseenter: function (e) {
|
|
1880
|
+
this.$menu.find('.active').removeClass('active')
|
|
1881
|
+
$(e.currentTarget).addClass('active')
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
/* TYPEAHEAD PLUGIN DEFINITION
|
|
1888
|
+
* =========================== */
|
|
1889
|
+
|
|
1890
|
+
$.fn.typeahead = function (option) {
|
|
1891
|
+
return this.each(function () {
|
|
1892
|
+
var $this = $(this)
|
|
1893
|
+
, data = $this.data('typeahead')
|
|
1894
|
+
, options = typeof option == 'object' && option
|
|
1895
|
+
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
|
|
1896
|
+
if (typeof option == 'string') data[option]()
|
|
1897
|
+
})
|
|
1898
|
+
}
|
|
1899
|
+
|
|
1900
|
+
$.fn.typeahead.defaults = {
|
|
1901
|
+
source: []
|
|
1902
|
+
, items: 8
|
|
1903
|
+
, menu: '<ul class="typeahead dropdown-menu"></ul>'
|
|
1904
|
+
, item: '<li><a href="#"></a></li>'
|
|
1905
|
+
, minLength: 1
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
$.fn.typeahead.Constructor = Typeahead
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
/* TYPEAHEAD DATA-API
|
|
1912
|
+
* ================== */
|
|
1913
|
+
|
|
1914
|
+
$(function () {
|
|
1915
|
+
$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
|
1916
|
+
var $this = $(this)
|
|
1917
|
+
if ($this.data('typeahead')) return
|
|
1918
|
+
e.preventDefault()
|
|
1919
|
+
$this.typeahead($this.data())
|
|
1920
|
+
})
|
|
1921
|
+
})
|
|
1922
|
+
|
|
1923
|
+
}(window.jQuery);
|
|
1924
|
+
/* ==========================================================
|
|
1925
|
+
* bootstrap-affix.js v2.1.1
|
|
1926
|
+
* http://twitter.github.com/bootstrap/javascript.html#affix
|
|
1927
|
+
* ==========================================================
|
|
1928
|
+
* Copyright 2012 Twitter, Inc.
|
|
1929
|
+
*
|
|
1930
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1931
|
+
* you may not use this file except in compliance with the License.
|
|
1932
|
+
* You may obtain a copy of the License at
|
|
1933
|
+
*
|
|
1934
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1935
|
+
*
|
|
1936
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1937
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1938
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1939
|
+
* See the License for the specific language governing permissions and
|
|
1940
|
+
* limitations under the License.
|
|
1941
|
+
* ========================================================== */
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
!function ($) {
|
|
1945
|
+
|
|
1946
|
+
"use strict"; // jshint ;_;
|
|
1947
|
+
|
|
1948
|
+
|
|
1949
|
+
/* AFFIX CLASS DEFINITION
|
|
1950
|
+
* ====================== */
|
|
1951
|
+
|
|
1952
|
+
var Affix = function (element, options) {
|
|
1953
|
+
this.options = $.extend({}, $.fn.affix.defaults, options)
|
|
1954
|
+
this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
|
|
1955
|
+
this.$element = $(element)
|
|
1956
|
+
this.checkPosition()
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
Affix.prototype.checkPosition = function () {
|
|
1960
|
+
if (!this.$element.is(':visible')) return
|
|
1961
|
+
|
|
1962
|
+
var scrollHeight = $(document).height()
|
|
1963
|
+
, scrollTop = this.$window.scrollTop()
|
|
1964
|
+
, position = this.$element.offset()
|
|
1965
|
+
, offset = this.options.offset
|
|
1966
|
+
, offsetBottom = offset.bottom
|
|
1967
|
+
, offsetTop = offset.top
|
|
1968
|
+
, reset = 'affix affix-top affix-bottom'
|
|
1969
|
+
, affix
|
|
1970
|
+
|
|
1971
|
+
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
|
1972
|
+
if (typeof offsetTop == 'function') offsetTop = offset.top()
|
|
1973
|
+
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
|
|
1974
|
+
|
|
1975
|
+
affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
|
|
1976
|
+
false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
|
|
1977
|
+
'bottom' : offsetTop != null && scrollTop <= offsetTop ?
|
|
1978
|
+
'top' : false
|
|
1979
|
+
|
|
1980
|
+
if (this.affixed === affix) return
|
|
1981
|
+
|
|
1982
|
+
this.affixed = affix
|
|
1983
|
+
this.unpin = affix == 'bottom' ? position.top - scrollTop : null
|
|
1984
|
+
|
|
1985
|
+
this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
|
|
1989
|
+
/* AFFIX PLUGIN DEFINITION
|
|
1990
|
+
* ======================= */
|
|
1991
|
+
|
|
1992
|
+
$.fn.affix = function (option) {
|
|
1993
|
+
return this.each(function () {
|
|
1994
|
+
var $this = $(this)
|
|
1995
|
+
, data = $this.data('affix')
|
|
1996
|
+
, options = typeof option == 'object' && option
|
|
1997
|
+
if (!data) $this.data('affix', (data = new Affix(this, options)))
|
|
1998
|
+
if (typeof option == 'string') data[option]()
|
|
1999
|
+
})
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
$.fn.affix.Constructor = Affix
|
|
2003
|
+
|
|
2004
|
+
$.fn.affix.defaults = {
|
|
2005
|
+
offset: 0
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
/* AFFIX DATA-API
|
|
2010
|
+
* ============== */
|
|
2011
|
+
|
|
2012
|
+
$(window).on('load', function () {
|
|
2013
|
+
$('[data-spy="affix"]').each(function () {
|
|
2014
|
+
var $spy = $(this)
|
|
2015
|
+
, data = $spy.data()
|
|
2016
|
+
|
|
2017
|
+
data.offset = data.offset || {}
|
|
2018
|
+
|
|
2019
|
+
data.offsetBottom && (data.offset.bottom = data.offsetBottom)
|
|
2020
|
+
data.offsetTop && (data.offset.top = data.offsetTop)
|
|
2021
|
+
|
|
2022
|
+
$spy.affix(data)
|
|
2023
|
+
})
|
|
2024
|
+
})
|
|
2025
|
+
|
|
2026
|
+
|
|
2027
|
+
}(window.jQuery);
|