From 420353a562942a7b4045464cc3981ec18bdabe33 Mon Sep 17 00:00:00 2001 From: timb Date: Fri, 15 Jan 2010 17:33:12 -0800 Subject: added login form to banner --- static/form_login/front.css | 125 +++++++++++++++++++++ static/form_login/images/.DS_Store | Bin 0 -> 6148 bytes static/form_login/images/bg-btn-blue.png | Bin 0 -> 380 bytes static/form_login/images/front-bg.gif | Bin 0 -> 78 bytes .../form_login/images/signin-nav-bg-hover-ie.png | Bin 0 -> 266 bytes static/form_login/images/signin-nav-bg-ie.png | Bin 0 -> 346 bytes static/form_login/images/toggle_down_light.png | Bin 0 -> 277 bytes static/form_login/images/toggle_up_dark.png | Bin 0 -> 288 bytes static/form_login/javascripts/.DS_Store | Bin 0 -> 6148 bytes static/form_login/javascripts/jquery.js | 19 ++++ static/form_login/javascripts/jquery.pop.js | 63 +++++++++++ 11 files changed, 207 insertions(+) create mode 100644 static/form_login/front.css create mode 100644 static/form_login/images/.DS_Store create mode 100644 static/form_login/images/bg-btn-blue.png create mode 100644 static/form_login/images/front-bg.gif create mode 100644 static/form_login/images/signin-nav-bg-hover-ie.png create mode 100644 static/form_login/images/signin-nav-bg-ie.png create mode 100644 static/form_login/images/toggle_down_light.png create mode 100644 static/form_login/images/toggle_up_dark.png create mode 100644 static/form_login/javascripts/.DS_Store create mode 100644 static/form_login/javascripts/jquery.js create mode 100644 static/form_login/javascripts/jquery.pop.js (limited to 'static') diff --git a/static/form_login/front.css b/static/form_login/front.css new file mode 100644 index 0000000..936d9ec --- /dev/null +++ b/static/form_login/front.css @@ -0,0 +1,125 @@ +#login-container { + width:780px; + margin:0 auto; + position: relative; +} + +#login-container a:link, a:visited { + color:#27b; + text-decoration:none; +} +#login-container .topnav { + padding:10px 0px 12px; + font-size:11px; + line-height:23px; + text-align:right; +} +#login-container .topnav a.signin { + background:#88bbd4; + padding:4px 6px 6px; + text-decoration:none; + font-weight:bold; + color:#fff; + -webkit-border-radius:4px; + -moz-border-radius:4px; + border-radius:4px; + *background:transparent url("images/signin-nav-bg-ie.png") no-repeat 0 0; + *padding:4px 12px 6px; +} +#login-container .topnav a.signin:hover { + background:#59B; + *background:transparent url("images/signin-nav-bg-hover-ie.png") no-repeat 0 0; + *padding:4px 12px 6px; +} +#login-container .topnav a.signin, #login-container .topnav a.signin:hover { + *background-position:0 3px!important; +} + +a.signin { + position:relative; + margin-left:3px; +} +a.signin span { + background-image:url("images/toggle_down_light.png"); + background-repeat:no-repeat; + background-position:100% 50%; + padding:4px 16px 6px 0; +} +#login-container .topnav a.menu-open { + background:#ddeef6!important; + color:#666!important; + outline:none; +} + +a.signin.menu-open span { + background-image:url("images/toggle_up_dark.png"); + color:#789; +} + +#signin_menu { + -moz-border-radius-topleft:5px; + -moz-border-radius-bottomleft:5px; + -moz-border-radius-bottomright:5px; + -webkit-border-top-left-radius:5px; + -webkit-border-bottom-left-radius:5px; + -webkit-border-bottom-right-radius:5px; + display:none; + background-color:#ddeef6; + position:absolute; + width:210px; + z-index:100; + border:1px transparent; + text-align:left; + padding:12px; + top: 24.5px; + right: 0px; + margin-top:5px; + margin-right: 0px; + *margin-right: -1px; + color:#789; + font-size:11px; +} + +#signin_menu input[type=text], #signin_menu input[type=password] { + display:block; + -moz-border-radius:4px; + -webkit-border-radius:4px; + border:1px solid #ACE; + font-size:13px; + margin:0 0 5px; + padding:5px; + width:203px; +} +#signin_menu p { + margin:0; +} +#signin_menu a { + color:#6AC; +} +#signin_menu label { + font-weight:normal; +} + +#signin_menu p a { + color:#27B!important; +} +#loginSubmit { + -moz-border-radius:4px; + -webkit-border-radius:4px; + background:#39d url('images/bg-btn-blue.png') repeat-x scroll 0 0; + border:1px solid #39D; + color:#fff; + text-shadow:0 -1px 0 #39d; + padding:4px 10px 5px; + font-size:11px; + margin:0 5px 0 0; + font-weight:bold; +} +#loginSubmit::-moz-focus-inner { +padding:0; +border:0; +} +#loginSubmit:hover, #loginSubmit:focus { + background-position:0 -5px; + cursor:pointer; +} \ No newline at end of file diff --git a/static/form_login/images/.DS_Store b/static/form_login/images/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/static/form_login/images/.DS_Store differ diff --git a/static/form_login/images/bg-btn-blue.png b/static/form_login/images/bg-btn-blue.png new file mode 100644 index 0000000..058f726 Binary files /dev/null and b/static/form_login/images/bg-btn-blue.png differ diff --git a/static/form_login/images/front-bg.gif b/static/form_login/images/front-bg.gif new file mode 100644 index 0000000..dcd3ba9 Binary files /dev/null and b/static/form_login/images/front-bg.gif differ diff --git a/static/form_login/images/signin-nav-bg-hover-ie.png b/static/form_login/images/signin-nav-bg-hover-ie.png new file mode 100644 index 0000000..a89bb69 Binary files /dev/null and b/static/form_login/images/signin-nav-bg-hover-ie.png differ diff --git a/static/form_login/images/signin-nav-bg-ie.png b/static/form_login/images/signin-nav-bg-ie.png new file mode 100644 index 0000000..f0a0d2b Binary files /dev/null and b/static/form_login/images/signin-nav-bg-ie.png differ diff --git a/static/form_login/images/toggle_down_light.png b/static/form_login/images/toggle_down_light.png new file mode 100644 index 0000000..d354161 Binary files /dev/null and b/static/form_login/images/toggle_down_light.png differ diff --git a/static/form_login/images/toggle_up_dark.png b/static/form_login/images/toggle_up_dark.png new file mode 100644 index 0000000..951d903 Binary files /dev/null and b/static/form_login/images/toggle_up_dark.png differ diff --git a/static/form_login/javascripts/.DS_Store b/static/form_login/javascripts/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/static/form_login/javascripts/.DS_Store differ diff --git a/static/form_login/javascripts/jquery.js b/static/form_login/javascripts/jquery.js new file mode 100644 index 0000000..396646c --- /dev/null +++ b/static/form_login/javascripts/jquery.js @@ -0,0 +1,19 @@ +/* + * jQuery JavaScript Library v1.3 + * http://jquery.com/ + * + * Copyright (c) 2009 John Resig + * Dual licensed under the MIT and GPL licenses. + * http://docs.jquery.com/License + * + * Date: 2009-01-13 12:50:31 -0500 (Tue, 13 Jan 2009) + * Revision: 6104 + */ +(function(){var l=this,g,x=l.jQuery,o=l.$,n=l.jQuery=l.$=function(D,E){return new n.fn.init(D,E)},C=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;n.fn=n.prototype={init:function(D,G){D=D||document;if(D.nodeType){this[0]=D;this.length=1;this.context=D;return this}if(typeof D==="string"){var F=C.exec(D);if(F&&(F[1]||!G)){if(F[1]){D=n.clean([F[1]],G)}else{var H=document.getElementById(F[3]);if(H){if(H.id!=F[3]){return n().find(D)}var E=n(H);E.context=document;E.selector=D;return E}D=[]}}else{return n(G).find(D)}}else{if(n.isFunction(D)){return n(document).ready(D)}}if(D.selector&&D.context){this.selector=D.selector;this.context=D.context}return this.setArray(n.makeArray(D))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(D){return D===g?n.makeArray(this):this[D]},pushStack:function(E,G,D){var F=n(E);F.prevObject=this;F.context=this.context;if(G==="find"){F.selector=this.selector+(this.selector?" ":"")+D}else{if(G){F.selector=this.selector+"."+G+"("+D+")"}}return F},setArray:function(D){this.length=0;Array.prototype.push.apply(this,D);return this},each:function(E,D){return n.each(this,E,D)},index:function(D){return n.inArray(D&&D.jquery?D[0]:D,this)},attr:function(E,G,F){var D=E;if(typeof E==="string"){if(G===g){return this[0]&&n[F||"attr"](this[0],E)}else{D={};D[E]=G}}return this.each(function(H){for(E in D){n.attr(F?this.style:this,E,n.prop(this,D[E],F,H,E))}})},css:function(D,E){if((D=="width"||D=="height")&&parseFloat(E)<0){E=g}return this.attr(D,E,"curCSS")},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))}var D="";n.each(E||this,function(){n.each(this.childNodes,function(){if(this.nodeType!=8){D+=this.nodeType!=1?this.nodeValue:n.fn.text([this])}})});return D},wrapAll:function(D){if(this[0]){var E=n(D,this[0].ownerDocument).clone();if(this[0].parentNode){E.insertBefore(this[0])}E.map(function(){var F=this;while(F.firstChild){F=F.firstChild}return F}).append(this)}return this},wrapInner:function(D){return this.each(function(){n(this).contents().wrapAll(D)})},wrap:function(D){return this.each(function(){n(this).wrapAll(D)})},append:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.appendChild(D)}})},prepend:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.insertBefore(D,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this)})},after:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this.nextSibling)})},end:function(){return this.prevObject||n([])},push:[].push,find:function(D){if(this.length===1&&!/,/.test(D)){var F=this.pushStack([],"find",D);F.length=0;n.find(D,this[0],F);return F}else{var E=n.map(this,function(G){return n.find(D,G)});return this.pushStack(/[^+>] [^+>]/.test(D)?n.unique(E):E,"find",D)}},clone:function(E){var D=this.map(function(){if(!n.support.noCloneEvent&&!n.isXMLDoc(this)){var H=this.cloneNode(true),G=document.createElement("div");G.appendChild(H);return n.clean([G.innerHTML])[0]}else{return this.cloneNode(true)}});var F=D.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(E===true){this.find("*").andSelf().each(function(H){if(this.nodeType==3){return}var G=n.data(this,"events");for(var J in G){for(var I in G[J]){n.event.add(F[H],J,G[J][I],G[J][I].data)}}})}return D},filter:function(D){return this.pushStack(n.isFunction(D)&&n.grep(this,function(F,E){return D.call(F,E)})||n.multiFilter(D,n.grep(this,function(E){return E.nodeType===1})),"filter",D)},closest:function(D){var E=n.expr.match.POS.test(D)?n(D):null;return this.map(function(){var F=this;while(F&&F.ownerDocument){if(E?E.index(F)>-1:n(F).is(D)){return F}F=F.parentNode}})},not:function(D){if(typeof D==="string"){if(f.test(D)){return this.pushStack(n.multiFilter(D,this,true),"not",D)}else{D=n.multiFilter(D,this)}}var E=D.length&&D[D.length-1]!==g&&!D.nodeType;return this.filter(function(){return E?n.inArray(this,D)<0:this!=D})},add:function(D){return this.pushStack(n.unique(n.merge(this.get(),typeof D==="string"?n(D):n.makeArray(D))))},is:function(D){return !!D&&n.multiFilter(D,this).length>0},hasClass:function(D){return !!D&&this.is("."+D)},val:function(J){if(J===g){var D=this[0];if(D){if(n.nodeName(D,"option")){return(D.attributes.value||{}).specified?D.value:D.text}if(n.nodeName(D,"select")){var H=D.selectedIndex,K=[],L=D.options,G=D.type=="select-one";if(H<0){return null}for(var E=G?H:0,I=G?H+1:L.length;E=0||n.inArray(this.name,J)>=0)}else{if(n.nodeName(this,"select")){var M=n.makeArray(J);n("option",this).each(function(){this.selected=(n.inArray(this.value,M)>=0||n.inArray(this.text,M)>=0)});if(!M.length){this.selectedIndex=-1}}else{this.value=J}}})},html:function(D){return D===g?(this[0]?this[0].innerHTML:null):this.empty().append(D)},replaceWith:function(D){return this.after(D).remove()},eq:function(D){return this.slice(D,+D+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(F,E){return D.call(F,E,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=n.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild,D=this.length>1?I.cloneNode(true):I;if(H){for(var G=0,E=this.length;G0?D.cloneNode(true):I)}}if(F){n.each(F,y)}}return this;function K(N,O){return M&&n.nodeName(N,"table")&&n.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};n.fn.init.prototype=n.fn;function y(D,E){if(E.src){n.ajax({url:E.src,async:false,dataType:"script"})}else{n.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function e(){return +new Date}n.extend=n.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,D=false,F;if(typeof I==="boolean"){D=I;I=arguments[1]||{};G=2}if(typeof I!=="object"&&!n.isFunction(I)){I={}}if(H==G){I=this;--G}for(;G-1}},swap:function(G,F,H){var D={};for(var E in F){D[E]=G.style[E];G.style[E]=F[E]}H.call(G);for(var E in F){G.style[E]=D[E]}},css:function(F,D,H){if(D=="width"||D=="height"){var J,E={position:"absolute",visibility:"hidden",display:"block"},I=D=="width"?["Left","Right"]:["Top","Bottom"];function G(){J=D=="width"?F.offsetWidth:F.offsetHeight;var L=0,K=0;n.each(I,function(){L+=parseFloat(n.curCSS(F,"padding"+this,true))||0;K+=parseFloat(n.curCSS(F,"border"+this+"Width",true))||0});J-=Math.round(L+K)}if(n(F).is(":visible")){G()}else{n.swap(F,E,G)}return Math.max(0,J)}return n.curCSS(F,D,H)},curCSS:function(H,E,F){var K,D=H.style;if(E=="opacity"&&!n.support.opacity){K=n.attr(D,"opacity");return K==""?"1":K}if(E.match(/float/i)){E=v}if(!F&&D&&D[E]){K=D[E]}else{if(p.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=p.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E)}if(E=="opacity"&&K==""){K="1"}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(M,N){return N.toUpperCase()});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=D.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;D.left=K||0;K=D.pixelLeft+"px";D.left=G;H.runtimeStyle.left=J}}}}return K},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])]}}var F=[],D=[],K=J.createElement("div");n.each(E,function(O,Q){if(typeof Q==="number"){Q+=""}if(!Q){return}if(typeof Q==="string"){Q=Q.replace(/(<(\w+)[^>]*?)\/>/g,function(S,T,R){return R.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?S:T+">"});var N=n.trim(Q).toLowerCase();var P=!N.indexOf("",""]||!N.indexOf("",""]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!N.indexOf("",""]||(!N.indexOf("",""]||!N.indexOf("",""]||!n.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];K.innerHTML=P[1]+Q+P[2];while(P[0]--){K=K.lastChild}if(!n.support.tbody){var M=!N.indexOf(""&&N.indexOf("=0;--L){if(n.nodeName(M[L],"tbody")&&!M[L].childNodes.length){M[L].parentNode.removeChild(M[L])}}}if(!n.support.leadingWhitespace&&/^\s/.test(Q)){K.insertBefore(J.createTextNode(Q.match(/^\s*/)[0]),K.firstChild)}Q=n.makeArray(K.childNodes)}if(Q.nodeType){F.push(Q)}else{F=n.merge(F,Q)}});if(H){for(var I=0;F[I];I++){if(n.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){D.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I])}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(n.makeArray(F[I].getElementsByTagName("script"))))}H.appendChild(F[I])}}return D}return F},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return g}var G=!n.isXMLDoc(I),K=J!==g;F=G&&n.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(F in I&&G&&!E){if(K){if(F=="type"&&n.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[F]=J}if(n.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:g}return I[F]}if(!n.support.style&&G&&F=="style"){return n.attr(I.style,"cssText",J)}if(K){I.setAttribute(F,""+J)}var D=!n.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return D===null?g:D}if(!n.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}F=F.replace(/-([a-z])/ig,function(L,M){return M.toUpperCase()});if(K){I[F]=J}return I[F]},trim:function(D){return(D||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var D=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||n.isFunction(F)||F.setInterval){D[0]=F}else{while(E){D[--E]=F[E]}}}return D},inArray:function(F,G){for(var D=0,E=G.length;D*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(D,E){n.fn[D]=function(){return this.each(E,arguments)}});function j(D,E){return D[0]&&parseInt(n.curCSS(D[0],E,true),10)||0}var h="jQuery"+e(),u=0,z={};n.extend({cache:{},data:function(E,D,F){E=E==l?z:E;var G=E[h];if(!G){G=E[h]=++u}if(D&&!n.cache[G]){n.cache[G]={}}if(F!==g){n.cache[G][D]=F}return D?n.cache[G][D]:G},removeData:function(E,D){E=E==l?z:E;var G=E[h];if(D){if(n.cache[G]){delete n.cache[G][D];D="";for(D in n.cache[G]){break}if(!D){n.removeData(E)}}}else{try{delete E[h]}catch(F){if(E.removeAttribute){E.removeAttribute(h)}}delete n.cache[G]}},queue:function(E,D,G){if(E){D=(D||"fx")+"queue";var F=n.data(E,D);if(!F||n.isArray(G)){F=n.data(E,D,n.makeArray(G))}else{if(G){F.push(G)}}}return F},dequeue:function(G,F){var D=n.queue(G,F),E=D.shift();if(!F||F==="fx"){E=D[0]}if(E!==g){E.call(G)}}});n.fn.extend({data:function(D,F){var G=D.split(".");G[1]=G[1]?"."+G[1]:"";if(F===g){var E=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(E===g&&this.length){E=n.data(this[0],D)}return E===g&&G[1]?this.data(G[0]):E}else{return this.trigger("setData"+G[1]+"!",[G[0],F]).each(function(){n.data(this,D,F)})}},removeData:function(D){return this.each(function(){n.removeData(this,D)})},queue:function(D,E){if(typeof D!=="string"){E=D;D="fx"}if(E===g){return n.queue(this[0],D)}return this.each(function(){var F=n.queue(this,D,E);if(D=="fx"&&F.length==1){F[0].call(this)}})},dequeue:function(D){return this.each(function(){n.dequeue(this,D)})}}); +/* + * Sizzle CSS Selector Engine - v0.9.1 + * Copyright 2009, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,I=0,F=Object.prototype.toString;var E=function(ae,S,aa,V){aa=aa||[];S=S||document;if(S.nodeType!==1&&S.nodeType!==9){return[]}if(!ae||typeof ae!=="string"){return aa}var ab=[],ac,Y,ah,ag,Z,R,Q=true;N.lastIndex=0;while((ac=N.exec(ae))!==null){ab.push(ac[1]);if(ac[2]){R=RegExp.rightContext;break}}if(ab.length>1&&G.match.POS.exec(ae)){if(ab.length===2&&G.relative[ab[0]]){var U="",X;while((X=G.match.POS.exec(ae))){U+=X[0];ae=ae.replace(G.match.POS,"")}Y=E.filter(U,E(/\s$/.test(ae)?ae+"*":ae,S))}else{Y=G.relative[ab[0]]?[S]:E(ab.shift(),S);while(ab.length){var P=[];ae=ab.shift();if(G.relative[ae]){ae+=ab.shift()}for(var af=0,ad=Y.length;af0){ah=D(Y)}else{Q=false}while(ab.length){var T=ab.pop(),W=T;if(!G.relative[T]){T=""}else{W=ab.pop()}if(W==null){W=S}G.relative[T](ah,W,M(S))}}if(!ah){ah=Y}if(!ah){throw"Syntax error, unrecognized expression: "+(T||ae)}if(F.call(ah)==="[object Array]"){if(!Q){aa.push.apply(aa,ah)}else{if(S.nodeType===1){for(var af=0;ah[af]!=null;af++){if(ah[af]&&(ah[af]===true||ah[af].nodeType===1&&H(S,ah[af]))){aa.push(Y[af])}}}else{for(var af=0;ah[af]!=null;af++){if(ah[af]&&ah[af].nodeType===1){aa.push(Y[af])}}}}}else{D(ah,aa)}if(R){E(R,S,aa,V)}return aa};E.matches=function(P,Q){return E(P,null,null,Q)};E.find=function(V,S){var W,Q;if(!V){return[]}for(var R=0,P=G.order.length;R":function(U,Q,V){if(typeof Q==="string"&&!/\W/.test(Q)){Q=V?Q:Q.toUpperCase();for(var R=0,P=U.length;R=0){if(!R){P.push(Q[T])}}else{if(R){Q[T]=false}}}return false},ID:function(P){return P[1].replace(/\\/g,"")},TAG:function(Q,P){for(var R=0;!P[R];R++){}return M(P[R])?Q[1]:Q[1].toUpperCase()},CHILD:function(P){if(P[1]=="nth"){var Q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(P[2]=="even"&&"2n"||P[2]=="odd"&&"2n+1"||!/\D/.test(P[2])&&"0n+"+P[2]||P[2]);P[2]=(Q[1]+(Q[2]||1))-0;P[3]=Q[3]-0}P[0]="done"+(I++);return P},ATTR:function(Q){var P=Q[1];if(G.attrMap[P]){Q[1]=G.attrMap[P]}if(Q[2]==="~="){Q[4]=" "+Q[4]+" "}return Q},PSEUDO:function(T,Q,R,P,U){if(T[1]==="not"){if(T[3].match(N).length>1){T[3]=E(T[3],null,null,Q)}else{var S=E.filter(T[3],Q,R,true^U);if(!R){P.push.apply(P,S)}return false}}else{if(G.match.POS.test(T[0])){return true}}return T},POS:function(P){P.unshift(true);return P}},filters:{enabled:function(P){return P.disabled===false&&P.type!=="hidden"},disabled:function(P){return P.disabled===true},checked:function(P){return P.checked===true},selected:function(P){P.parentNode.selectedIndex;return P.selected===true},parent:function(P){return !!P.firstChild},empty:function(P){return !P.firstChild},has:function(R,Q,P){return !!E(P[3],R).length},header:function(P){return/h\d/i.test(P.nodeName)},text:function(P){return"text"===P.type},radio:function(P){return"radio"===P.type},checkbox:function(P){return"checkbox"===P.type},file:function(P){return"file"===P.type},password:function(P){return"password"===P.type},submit:function(P){return"submit"===P.type},image:function(P){return"image"===P.type},reset:function(P){return"reset"===P.type},button:function(P){return"button"===P.type||P.nodeName.toUpperCase()==="BUTTON"},input:function(P){return/input|select|textarea|button/i.test(P.nodeName)}},setFilters:{first:function(Q,P){return P===0},last:function(R,Q,P,S){return Q===S.length-1},even:function(Q,P){return P%2===0},odd:function(Q,P){return P%2===1},lt:function(R,Q,P){return QP[3]-0},nth:function(R,Q,P){return P[3]-0==Q},eq:function(R,Q,P){return P[3]-0==Q}},filter:{CHILD:function(P,S){var V=S[1],W=P.parentNode;var U="child"+W.childNodes.length;if(W&&(!W[U]||!P.nodeIndex)){var T=1;for(var Q=W.firstChild;Q;Q=Q.nextSibling){if(Q.nodeType==1){Q.nodeIndex=T++}}W[U]=T-1}if(V=="first"){return P.nodeIndex==1}else{if(V=="last"){return P.nodeIndex==W[U]}else{if(V=="only"){return W[U]==1}else{if(V=="nth"){var Y=false,R=S[2],X=S[3];if(R==1&&X==0){return true}if(R==0){if(P.nodeIndex==X){Y=true}}else{if((P.nodeIndex-X)%R==0&&(P.nodeIndex-X)/R>=0){Y=true}}return Y}}}}},PSEUDO:function(V,R,S,W){var Q=R[1],T=G.filters[Q];if(T){return T(V,S,R,W)}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0}else{if(Q==="not"){var U=R[3];for(var S=0,P=U.length;S=0:S==="~="?(" "+U+" ").indexOf(Q)>=0:!R[4]?P:S==="!="?U!=Q:S==="^="?U.indexOf(Q)===0:S==="$="?U.substr(U.length-Q.length)===Q:S==="|="?U===Q||U.substr(0,Q.length+1)===Q+"-":false},POS:function(T,Q,R,U){var P=Q[2],S=G.setFilters[P];if(S){return S(T,R,Q,U)}}}};for(var K in G.match){G.match[K]=RegExp(G.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var D=function(Q,P){Q=Array.prototype.slice.call(Q);if(P){P.push.apply(P,Q);return P}return Q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){D=function(T,S){var Q=S||[];if(F.call(T)==="[object Array]"){Array.prototype.push.apply(Q,T)}else{if(typeof T.length==="number"){for(var R=0,P=T.length;R";var P=document.documentElement;P.insertBefore(Q,P.firstChild);if(!!document.getElementById(R)){G.find.ID=function(T,U){if(U.getElementById){var S=U.getElementById(T[1]);return S?S.id===T[1]||S.getAttributeNode&&S.getAttributeNode("id").nodeValue===T[1]?[S]:g:[]}};G.filter.ID=function(U,S){var T=U.getAttributeNode&&U.getAttributeNode("id");return U.nodeType===1&&T&&T.nodeValue===S}}P.removeChild(Q)})();(function(){var P=document.createElement("div");P.appendChild(document.createComment(""));if(P.getElementsByTagName("*").length>0){G.find.TAG=function(Q,U){var T=U.getElementsByTagName(Q[1]);if(Q[1]==="*"){var S=[];for(var R=0;T[R];R++){if(T[R].nodeType===1){S.push(T[R])}}T=S}return T}}P.innerHTML="";if(P.firstChild.getAttribute("href")!=="#"){G.attrHandle.href=function(Q){return Q.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var P=E;E=function(T,S,Q,R){S=S||document;if(!R&&S.nodeType===9){try{return D(S.querySelectorAll(T),Q)}catch(U){}}return P(T,S,Q,R)};E.find=P.find;E.filter=P.filter;E.selectors=P.selectors;E.matches=P.matches})()}if(document.documentElement.getElementsByClassName){G.order.splice(1,0,"CLASS");G.find.CLASS=function(P,Q){return Q.getElementsByClassName(P[1])}}function L(Q,W,V,Z,X,Y){for(var T=0,R=Z.length;T0){T=P;break}}}P=P[Q]}Y[S]=T}}}var H=document.compareDocumentPosition?function(Q,P){return Q.compareDocumentPosition(P)&16}:function(Q,P){return Q!==P&&(Q.contains?Q.contains(P):true)};var M=function(P){return P.documentElement&&!P.body||P.tagName&&P.ownerDocument&&!P.ownerDocument.body};n.find=E;n.filter=E.filter;n.expr=E.selectors;n.expr[":"]=n.expr.filters;E.selectors.filters.hidden=function(P){return"hidden"===P.type||n.css(P,"display")==="none"||n.css(P,"visibility")==="hidden"};E.selectors.filters.visible=function(P){return"hidden"!==P.type&&n.css(P,"display")!=="none"&&n.css(P,"visibility")!=="hidden"};E.selectors.filters.animated=function(P){return n.grep(n.timers,function(Q){return P===Q.elem}).length};n.multiFilter=function(R,P,Q){if(Q){R=":not("+R+")"}return E.matches(R,P)};n.dir=function(R,Q){var P=[],S=R[Q];while(S&&S!=document){if(S.nodeType==1){P.push(S)}S=S[Q]}return P};n.nth=function(T,P,R,S){P=P||1;var Q=0;for(;T;T=T[R]){if(T.nodeType==1&&++Q==P){break}}return T};n.sibling=function(R,Q){var P=[];for(;R;R=R.nextSibling){if(R.nodeType==1&&R!=Q){P.push(R)}}return P};return;l.Sizzle=E})();n.event={add:function(H,E,G,J){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=l){H=l}if(!G.guid){G.guid=this.guid++}if(J!==g){var F=G;G=this.proxy(F);G.data=J}var D=n.data(H,"events")||n.data(H,"events",{}),I=n.data(H,"handle")||n.data(H,"handle",function(){return typeof n!=="undefined"&&!n.event.triggered?n.event.handle.apply(arguments.callee.elem,arguments):g});I.elem=H;n.each(E.split(/\s+/),function(L,M){var N=M.split(".");M=N.shift();G.type=N.slice().sort().join(".");var K=D[M];if(n.event.specialAll[M]){n.event.specialAll[M].setup.call(H,J,N)}if(!K){K=D[M]={};if(!n.event.special[M]||n.event.special[M].setup.call(H,J,N)===false){if(H.addEventListener){H.addEventListener(M,I,false)}else{if(H.attachEvent){H.attachEvent("on"+M,I)}}}}K[G.guid]=G;n.event.global[M]=true});H=null},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return}var F=n.data(J,"events"),E,D;if(F){if(G===g||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""))}}else{if(G.type){I=G.handler;G=G.type}n.each(G.split(/\s+/),function(L,N){var P=N.split(".");N=P.shift();var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");if(F[N]){if(I){delete F[N][I.guid]}else{for(var O in F[N]){if(M.test(F[N][O].type)){delete F[N][O]}}}if(n.event.specialAll[N]){n.event.specialAll[N].teardown.call(J,P)}for(E in F[N]){break}if(!E){if(!n.event.special[N]||n.event.special[N].teardown.call(J,P)===false){if(J.removeEventListener){J.removeEventListener(N,n.data(J,"handle"),false)}else{if(J.detachEvent){J.detachEvent("on"+N,n.data(J,"handle"))}}}E=null;delete F[N]}}})}for(E in F){break}if(!E){var K=n.data(J,"handle");if(K){K.elem=null}n.removeData(J,"events");n.removeData(J,"handle")}}},trigger:function(H,J,G,D){var F=H.type||H;if(!D){H=typeof H==="object"?H[h]?H:n.extend(n.Event(F),H):n.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true}if(!G){H.stopPropagation();if(this.global[F]){n.each(n.cache,function(){if(this.events&&this.events[F]){n.event.trigger(H,J,this.handle.elem)}})}}if(!G||G.nodeType==3||G.nodeType==8){return g}H.result=g;H.target=G;J=n.makeArray(J);J.unshift(H)}H.currentTarget=G;var I=n.data(G,"handle");if(I){I.apply(G,J)}if((!G[F]||(n.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false}if(!D&&G[F]&&!H.isDefaultPrevented()&&!(n.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]()}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){n.event.trigger(H,J,E,true)}}},handle:function(J){var I,D;J=arguments[0]=n.event.fix(J||l.event);var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");D=(n.data(this,"events")||{})[J.type];for(var F in D){var G=D[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==g){J.result=E;if(E===false){J.preventDefault();J.stopPropagation()}}if(J.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(G){if(G[h]){return G}var E=G;G=n.Event(E);for(var F=this.props.length,I;F;){I=this.props[--F];G[I]=E[I]}if(!G.target){G.target=G.srcElement||document}if(G.target.nodeType==3){G.target=G.target.parentNode}if(!G.relatedTarget&&G.fromElement){G.relatedTarget=G.fromElement==G.target?G.toElement:G.fromElement}if(G.pageX==null&&G.clientX!=null){var H=document.documentElement,D=document.body;G.pageX=G.clientX+(H&&H.scrollLeft||D&&D.scrollLeft||0)-(H.clientLeft||0);G.pageY=G.clientY+(H&&H.scrollTop||D&&D.scrollTop||0)-(H.clientTop||0)}if(!G.which&&((G.charCode||G.charCode===0)?G.charCode:G.keyCode)){G.which=G.charCode||G.keyCode}if(!G.metaKey&&G.ctrlKey){G.metaKey=G.ctrlKey}if(!G.which&&G.button){G.which=(G.button&1?1:(G.button&2?3:(G.button&4?2:0)))}return G},proxy:function(E,D){D=D||function(){return E.apply(this,arguments)};D.guid=E.guid=E.guid||D.guid||this.guid++;return D},special:{ready:{setup:A,teardown:function(){}}},specialAll:{live:{setup:function(D,E){n.event.add(this,E[0],c)},teardown:function(F){if(F.length){var D=0,E=RegExp("(^|\\.)"+F[0]+"(\\.|$)");n.each((n.data(this,"events").live||{}),function(){if(E.test(this.type)){D++}});if(D<1){n.event.remove(this,F[0],c)}}}}}};n.Event=function(D){if(!this.preventDefault){return new n.Event(D)}if(D&&D.type){this.originalEvent=D;this.type=D.type;this.timeStamp=D.timeStamp}else{this.type=D}if(!this.timeStamp){this.timeStamp=e()}this[h]=true};function k(){return false}function t(){return true}n.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var D=this.originalEvent;if(!D){return}if(D.preventDefault){D.preventDefault()}D.returnValue=false},stopPropagation:function(){this.isPropagationStopped=t;var D=this.originalEvent;if(!D){return}if(D.stopPropagation){D.stopPropagation()}D.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(E){var D=E.relatedTarget;while(D&&D!=this){try{D=D.parentNode}catch(F){D=this}}if(D!=this){E.type=E.data;n.event.handle.apply(this,arguments)}};n.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(E,D){n.event.special[D]={setup:function(){n.event.add(this,E,a,D)},teardown:function(){n.event.remove(this,E,a)}}});n.fn.extend({bind:function(E,F,D){return E=="unload"?this.one(E,F,D):this.each(function(){n.event.add(this,E,D||F,D&&F)})},one:function(F,G,E){var D=n.event.proxy(E||G,function(H){n(this).unbind(H,D);return(E||G).apply(this,arguments)});return this.each(function(){n.event.add(this,F,D,E&&G)})},unbind:function(E,D){return this.each(function(){n.event.remove(this,E,D)})},trigger:function(D,E){return this.each(function(){n.event.trigger(D,E,this)})},triggerHandler:function(D,F){if(this[0]){var E=n.Event(D);E.preventDefault();E.stopPropagation();n.event.trigger(E,F,this[0]);return E.result}},toggle:function(F){var D=arguments,E=1;while(E=0){var D=F.slice(H,F.length);F=F.slice(0,H)}var G="GET";if(I){if(n.isFunction(I)){J=I;I=null}else{if(typeof I==="object"){I=n.param(I);G="POST"}}}var E=this;n.ajax({url:F,type:G,dataType:"html",data:I,complete:function(L,K){if(K=="success"||K=="notmodified"){E.html(D?n("
").append(L.responseText.replace(//g,"")).find(D):L.responseText)}if(J){E.each(J,[L.responseText,K,L])}}});return this},serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?n.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(D,E){var F=n(this).val();return F==null?null:n.isArray(F)?n.map(F,function(H,G){return{name:E.name,value:H}}):{name:E.name,value:F}}).get()}});n.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(D,E){n.fn[E]=function(F){return this.bind(E,F)}});var q=e();n.extend({get:function(D,F,G,E){if(n.isFunction(F)){G=F;F=null}return n.ajax({type:"GET",url:D,data:F,success:G,dataType:E})},getScript:function(D,E){return n.get(D,null,E,"script")},getJSON:function(D,E,F){return n.get(D,E,F,"json")},post:function(D,F,G,E){if(n.isFunction(F)){G=F;F={}}return n.ajax({type:"POST",url:D,data:F,success:G,dataType:E})},ajaxSetup:function(D){n.extend(n.ajaxSettings,D)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(L){L=n.extend(true,L,n.extend(true,{},n.ajaxSettings,L));var V,E=/=\?(&|$)/g,Q,U,F=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=n.param(L.data)}if(L.dataType=="jsonp"){if(F=="GET"){if(!L.url.match(E)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(E)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(E)||L.url.match(E))){V="jsonp"+q++;if(L.data){L.data=(L.data+"").replace(E,"="+V+"$1")}L.url=L.url.replace(E,"="+V+"$1");L.dataType="script";l[V]=function(W){U=W;H();K();l[V]=g;try{delete l[V]}catch(X){}if(G){G.removeChild(S)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&F=="GET"){var D=e();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+D+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+D:"")}if(L.data&&F=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!n.active++){n.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&F=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var G=document.getElementsByTagName("head")[0];var S=document.createElement("script");S.src=L.url;if(L.scriptCharset){S.charset=L.scriptCharset}if(!V){var N=false;S.onload=S.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){N=true;H();K();G.removeChild(S)}}}G.appendChild(S);return g}var J=false;var I=L.xhr();if(L.username){I.open(F,L.url,L.async,L.username,L.password)}else{I.open(F,L.url,L.async)}try{if(L.data){I.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){I.setRequestHeader("If-Modified-Since",n.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(I,L)===false){if(L.global&&!--n.active){n.event.trigger("ajaxStop")}I.abort();return false}if(L.global){n.event.trigger("ajaxSend",[I,L])}var M=function(W){if(I.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}}else{if(!J&&I&&(I.readyState==4||W=="timeout")){J=true;if(O){clearInterval(O);O=null}Q=W=="timeout"?"timeout":!n.httpSuccess(I)?"error":L.ifModified&&n.httpNotModified(I,L.url)?"notmodified":"success";if(Q=="success"){try{U=n.httpData(I,L.dataType,L)}catch(Y){Q="parsererror"}}if(Q=="success"){var X;try{X=I.getResponseHeader("Last-Modified")}catch(Y){}if(L.ifModified&&X){n.lastModified[L.url]=X}if(!V){H()}}else{n.handleError(L,I,Q)}K();if(L.async){I=null}}}};if(L.async){var O=setInterval(M,13);if(L.timeout>0){setTimeout(function(){if(I){if(!J){M("timeout")}if(I){I.abort()}}},L.timeout)}}try{I.send(L.data)}catch(R){n.handleError(L,I,null,R)}if(!L.async){M()}function H(){if(L.success){L.success(U,Q)}if(L.global){n.event.trigger("ajaxSuccess",[I,L])}}function K(){if(L.complete){L.complete(I,Q)}if(L.global){n.event.trigger("ajaxComplete",[I,L])}if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}return I},handleError:function(E,G,D,F){if(E.error){E.error(G,D,F)}if(E.global){n.event.trigger("ajaxError",[G,E,F])}},active:0,httpSuccess:function(E){try{return !E.status&&location.protocol=="file:"||(E.status>=200&&E.status<300)||E.status==304||E.status==1223}catch(D){}return false},httpNotModified:function(F,D){try{var G=F.getResponseHeader("Last-Modified");return F.status==304||G==n.lastModified[D]}catch(E){}return false},httpData:function(I,G,F){var E=I.getResponseHeader("content-type"),D=G=="xml"||!G&&E&&E.indexOf("xml")>=0,H=D?I.responseXML:I.responseText;if(D&&H.documentElement.tagName=="parsererror"){throw"parsererror"}if(F&&F.dataFilter){H=F.dataFilter(H,G)}if(typeof H==="string"){if(G=="script"){n.globalEval(H)}if(G=="json"){H=l["eval"]("("+H+")")}}return H},param:function(D){var F=[];function G(H,I){F[F.length]=encodeURIComponent(H)+"="+encodeURIComponent(I)}if(n.isArray(D)||D.jquery){n.each(D,function(){G(this.name,this.value)})}else{for(var E in D){if(n.isArray(D[E])){n.each(D[E],function(){G(E,this)})}else{G(E,n.isFunction(D[E])?D[E]():D[E])}}}return F.join("&").replace(/%20/g,"+")}});var m={},d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function s(E,D){var F={};n.each(d.concat.apply([],d.slice(0,D)),function(){F[this]=E});return F}n.fn.extend({show:function(I,K){if(I){return this.animate(s("show",3),I,K)}else{for(var G=0,E=this.length;G").appendTo("body");J=H.css("display");if(J==="none"){J="block"}H.remove();m[F]=J}this[G].style.display=n.data(this[G],"olddisplay",J)}}return this}},hide:function(G,H){if(G){return this.animate(s("hide",3),G,H)}else{for(var F=0,E=this.length;F=0;G--){if(F[G].elem==this){if(D){F[G](true)}F.splice(G,1)}}});if(!D){this.dequeue()}return this}});n.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(D,E){n.fn[D]=function(F,G){return this.animate(E,F,G)}});n.extend({speed:function(F,G,E){var D=typeof F==="object"?F:{complete:E||!E&&G||n.isFunction(F)&&F,duration:F,easing:E&&G||G&&!n.isFunction(G)&&G};D.duration=n.fx.off?0:typeof D.duration==="number"?D.duration:n.fx.speeds[D.duration]||n.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){n(this).dequeue()}if(n.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(F,G,D,E){return D+E*F},swing:function(F,G,D,E){return((-Math.cos(F*Math.PI)/2)+0.5)*E+D}},timers:[],timerId:null,fx:function(E,D,F){this.options=D;this.elem=E;this.prop=F;if(!D.orig){D.orig={}}}});n.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(n.fx.step[this.prop]||n.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(E){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var D=parseFloat(n.css(this.elem,this.prop,E));return D&&D>-10000?D:parseFloat(n.curCSS(this.elem,this.prop))||0},custom:function(H,G,F){this.startTime=e();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;function E(I){return D.step(I)}E.elem=this.elem;n.timers.push(E);if(E()&&n.timerId==null){n.timerId=setInterval(function(){var J=n.timers;for(var I=0;I=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var D=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){D=false}}if(D){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(n.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){n(this.elem).hide()}if(this.options.hide||this.options.show){for(var H in this.options.curAnim){n.attr(this.elem.style,H,this.options.orig[H])}}}if(D){this.options.complete.call(this.elem)}return false}else{var I=F-this.startTime;this.state=I/this.options.duration;this.pos=n.easing[this.options.easing||(n.easing.swing?"swing":"linear")](this.state,I,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};n.extend(n.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(D){n.attr(D.elem.style,"opacity",D.now)},_default:function(D){if(D.elem.style&&D.elem.style[D.prop]!=null){D.elem.style[D.prop]=D.now+D.unit}else{D.elem[D.prop]=D.now}}}});if(document.documentElement.getBoundingClientRect){n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,D=I.documentElement,K=D.clientTop||E.clientTop||0,J=D.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||n.boxModel&&D.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||n.boxModel&&D.scrollLeft||E.scrollLeft)-J;return{top:H,left:G}}}else{n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}n.offset.initialized||n.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,D=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(n.offset.doesNotAddBorder&&!(n.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}E=F,F=I.offsetParent}if(n.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}D=L}if(D.position==="relative"||D.position==="static"){M+=J.offsetTop,H+=J.offsetLeft}if(D.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:M,left:H}}}n.offset={initialize:function(){if(this.initialized){return}var K=document.body,E=document.createElement("div"),G,F,M,H,L,D,I=K.style.marginTop,J='
';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(D in L){E.style[D]=L[D]}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true},bodyOffset:function(D){n.offset.initialized||n.offset.initialize();var F=D.offsetTop,E=D.offsetLeft;if(n.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(n.curCSS(D,"marginTop",true),10)||0,E+=parseInt(n.curCSS(D,"marginLeft",true),10)||0}return{top:F,left:E}}};n.fn.extend({position:function(){var H=0,G=0,E;if(this[0]){var F=this.offsetParent(),I=this.offset(),D=/^body|html$/i.test(F[0].tagName)?{top:0,left:0}:F.offset();I.top-=j(this,"marginTop");I.left-=j(this,"marginLeft");D.top+=j(F,"borderTopWidth");D.left+=j(F,"borderLeftWidth");E={top:I.top-D.top,left:I.left-D.left}}return E},offsetParent:function(){var D=this[0].offsetParent||document.body;while(D&&(!/^body|html$/i.test(D.tagName)&&n.css(D,"position")=="static")){D=D.offsetParent}return n(D)}});n.each(["Left","Top"],function(E,D){var F="scroll"+D;n.fn[F]=function(G){if(!this[0]){return null}return G!==g?this.each(function(){this==l||this==document?l.scrollTo(!E?G:n(l).scrollLeft(),E?G:n(l).scrollTop()):this[F]=G}):this[0]==l||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||n.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});n.each(["Height","Width"],function(G,E){var D=G?"Left":"Top",F=G?"Right":"Bottom";n.fn["inner"+E]=function(){return this[E.toLowerCase()]()+j(this,"padding"+D)+j(this,"padding"+F)};n.fn["outer"+E]=function(I){return this["inner"+E]()+j(this,"border"+D+"Width")+j(this,"border"+F+"Width")+(I?j(this,"margin"+D)+j(this,"margin"+F):0)};var H=E.toLowerCase();n.fn[H]=function(I){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+E]||document.body["client"+E]:this[0]==document?Math.max(document.documentElement["client"+E],document.body["scroll"+E],document.documentElement["scroll"+E],document.body["offset"+E],document.documentElement["offset"+E]):I===g?(this.length?n.css(this[0],H):null):this.css(H,typeof I==="string"?I:I+"px")}})})(); \ No newline at end of file diff --git a/static/form_login/javascripts/jquery.pop.js b/static/form_login/javascripts/jquery.pop.js new file mode 100644 index 0000000..c53d4e3 --- /dev/null +++ b/static/form_login/javascripts/jquery.pop.js @@ -0,0 +1,63 @@ +// +// pop! for jQuery +// v0.2 requires jQuery v1.2 or later +// +// Licensed under the MIT: +// http://www.opensource.org/licenses/mit-license.php +// +// Copyright 2007,2008 SEAOFCLOUDS [http://seaofclouds.com] +// + +(function($) { + + $.pop = function(options){ + + // settings + var settings = { + pop_class : '.pop', + pop_toggle_text : '' + } + + // inject html wrapper + function initpops (){ + $(settings.pop_class).each(function() { + var pop_classes = $(this).attr("class"); + $(this).addClass("pop_menu"); + $(this).wrap("
"); + $(".pop_menu").attr("class", "pop_menu"); + $(this).before(" \ +
"+settings.pop_toggle_text+"
\ + "); + }); + } + initpops(); + + // assign reverse z-indexes to each pop + var totalpops = $(settings.pop_class).size() + 1000; + $(settings.pop_class).each(function(i) { + var popzindex = totalpops - i; + $(this).css({ zIndex: popzindex }); + }); + // close pops if user clicks outside of pop + activePop = null; + function closeInactivePop() { + $(settings.pop_class).each(function (i) { + if ($(this).hasClass('active') && i!=activePop) { + $(this).removeClass('active'); + } + }); + return false; + } + $(settings.pop_class).mouseover(function() { activePop = $(settings.pop_class).index(this); }); + $(settings.pop_class).mouseout(function() { activePop = null; }); + + $(document.body).click(function(){ + closeInactivePop(); + }); + // toggle that pop + $(".pop_toggle").click(function(){ + $(this).parent(settings.pop_class).toggleClass("active"); + }); + } + +})(jQuery); \ No newline at end of file -- cgit v1.2.3-70-g09d2 From cdcc81c23c6bcc3e455345a0fc8d5ed346f17089 Mon Sep 17 00:00:00 2001 From: timb Date: Fri, 15 Jan 2010 17:36:52 -0800 Subject: removed useless js --- static/form_login/javascripts/.DS_Store | Bin 6148 -> 0 bytes static/form_login/javascripts/jquery.js | 19 --------- static/form_login/javascripts/jquery.pop.js | 63 ---------------------------- 3 files changed, 82 deletions(-) delete mode 100644 static/form_login/javascripts/.DS_Store delete mode 100644 static/form_login/javascripts/jquery.js delete mode 100644 static/form_login/javascripts/jquery.pop.js (limited to 'static') diff --git a/static/form_login/javascripts/.DS_Store b/static/form_login/javascripts/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/static/form_login/javascripts/.DS_Store and /dev/null differ diff --git a/static/form_login/javascripts/jquery.js b/static/form_login/javascripts/jquery.js deleted file mode 100644 index 396646c..0000000 --- a/static/form_login/javascripts/jquery.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * jQuery JavaScript Library v1.3 - * http://jquery.com/ - * - * Copyright (c) 2009 John Resig - * Dual licensed under the MIT and GPL licenses. - * http://docs.jquery.com/License - * - * Date: 2009-01-13 12:50:31 -0500 (Tue, 13 Jan 2009) - * Revision: 6104 - */ -(function(){var l=this,g,x=l.jQuery,o=l.$,n=l.jQuery=l.$=function(D,E){return new n.fn.init(D,E)},C=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;n.fn=n.prototype={init:function(D,G){D=D||document;if(D.nodeType){this[0]=D;this.length=1;this.context=D;return this}if(typeof D==="string"){var F=C.exec(D);if(F&&(F[1]||!G)){if(F[1]){D=n.clean([F[1]],G)}else{var H=document.getElementById(F[3]);if(H){if(H.id!=F[3]){return n().find(D)}var E=n(H);E.context=document;E.selector=D;return E}D=[]}}else{return n(G).find(D)}}else{if(n.isFunction(D)){return n(document).ready(D)}}if(D.selector&&D.context){this.selector=D.selector;this.context=D.context}return this.setArray(n.makeArray(D))},selector:"",jquery:"1.3",size:function(){return this.length},get:function(D){return D===g?n.makeArray(this):this[D]},pushStack:function(E,G,D){var F=n(E);F.prevObject=this;F.context=this.context;if(G==="find"){F.selector=this.selector+(this.selector?" ":"")+D}else{if(G){F.selector=this.selector+"."+G+"("+D+")"}}return F},setArray:function(D){this.length=0;Array.prototype.push.apply(this,D);return this},each:function(E,D){return n.each(this,E,D)},index:function(D){return n.inArray(D&&D.jquery?D[0]:D,this)},attr:function(E,G,F){var D=E;if(typeof E==="string"){if(G===g){return this[0]&&n[F||"attr"](this[0],E)}else{D={};D[E]=G}}return this.each(function(H){for(E in D){n.attr(F?this.style:this,E,n.prop(this,D[E],F,H,E))}})},css:function(D,E){if((D=="width"||D=="height")&&parseFloat(E)<0){E=g}return this.attr(D,E,"curCSS")},text:function(E){if(typeof E!=="object"&&E!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(E))}var D="";n.each(E||this,function(){n.each(this.childNodes,function(){if(this.nodeType!=8){D+=this.nodeType!=1?this.nodeValue:n.fn.text([this])}})});return D},wrapAll:function(D){if(this[0]){var E=n(D,this[0].ownerDocument).clone();if(this[0].parentNode){E.insertBefore(this[0])}E.map(function(){var F=this;while(F.firstChild){F=F.firstChild}return F}).append(this)}return this},wrapInner:function(D){return this.each(function(){n(this).contents().wrapAll(D)})},wrap:function(D){return this.each(function(){n(this).wrapAll(D)})},append:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.appendChild(D)}})},prepend:function(){return this.domManip(arguments,true,function(D){if(this.nodeType==1){this.insertBefore(D,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this)})},after:function(){return this.domManip(arguments,false,function(D){this.parentNode.insertBefore(D,this.nextSibling)})},end:function(){return this.prevObject||n([])},push:[].push,find:function(D){if(this.length===1&&!/,/.test(D)){var F=this.pushStack([],"find",D);F.length=0;n.find(D,this[0],F);return F}else{var E=n.map(this,function(G){return n.find(D,G)});return this.pushStack(/[^+>] [^+>]/.test(D)?n.unique(E):E,"find",D)}},clone:function(E){var D=this.map(function(){if(!n.support.noCloneEvent&&!n.isXMLDoc(this)){var H=this.cloneNode(true),G=document.createElement("div");G.appendChild(H);return n.clean([G.innerHTML])[0]}else{return this.cloneNode(true)}});var F=D.find("*").andSelf().each(function(){if(this[h]!==g){this[h]=null}});if(E===true){this.find("*").andSelf().each(function(H){if(this.nodeType==3){return}var G=n.data(this,"events");for(var J in G){for(var I in G[J]){n.event.add(F[H],J,G[J][I],G[J][I].data)}}})}return D},filter:function(D){return this.pushStack(n.isFunction(D)&&n.grep(this,function(F,E){return D.call(F,E)})||n.multiFilter(D,n.grep(this,function(E){return E.nodeType===1})),"filter",D)},closest:function(D){var E=n.expr.match.POS.test(D)?n(D):null;return this.map(function(){var F=this;while(F&&F.ownerDocument){if(E?E.index(F)>-1:n(F).is(D)){return F}F=F.parentNode}})},not:function(D){if(typeof D==="string"){if(f.test(D)){return this.pushStack(n.multiFilter(D,this,true),"not",D)}else{D=n.multiFilter(D,this)}}var E=D.length&&D[D.length-1]!==g&&!D.nodeType;return this.filter(function(){return E?n.inArray(this,D)<0:this!=D})},add:function(D){return this.pushStack(n.unique(n.merge(this.get(),typeof D==="string"?n(D):n.makeArray(D))))},is:function(D){return !!D&&n.multiFilter(D,this).length>0},hasClass:function(D){return !!D&&this.is("."+D)},val:function(J){if(J===g){var D=this[0];if(D){if(n.nodeName(D,"option")){return(D.attributes.value||{}).specified?D.value:D.text}if(n.nodeName(D,"select")){var H=D.selectedIndex,K=[],L=D.options,G=D.type=="select-one";if(H<0){return null}for(var E=G?H:0,I=G?H+1:L.length;E=0||n.inArray(this.name,J)>=0)}else{if(n.nodeName(this,"select")){var M=n.makeArray(J);n("option",this).each(function(){this.selected=(n.inArray(this.value,M)>=0||n.inArray(this.text,M)>=0)});if(!M.length){this.selectedIndex=-1}}else{this.value=J}}})},html:function(D){return D===g?(this[0]?this[0].innerHTML:null):this.empty().append(D)},replaceWith:function(D){return this.after(D).remove()},eq:function(D){return this.slice(D,+D+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(D){return this.pushStack(n.map(this,function(F,E){return D.call(F,E,F)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=n.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild,D=this.length>1?I.cloneNode(true):I;if(H){for(var G=0,E=this.length;G0?D.cloneNode(true):I)}}if(F){n.each(F,y)}}return this;function K(N,O){return M&&n.nodeName(N,"table")&&n.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};n.fn.init.prototype=n.fn;function y(D,E){if(E.src){n.ajax({url:E.src,async:false,dataType:"script"})}else{n.globalEval(E.text||E.textContent||E.innerHTML||"")}if(E.parentNode){E.parentNode.removeChild(E)}}function e(){return +new Date}n.extend=n.fn.extend=function(){var I=arguments[0]||{},G=1,H=arguments.length,D=false,F;if(typeof I==="boolean"){D=I;I=arguments[1]||{};G=2}if(typeof I!=="object"&&!n.isFunction(I)){I={}}if(H==G){I=this;--G}for(;G-1}},swap:function(G,F,H){var D={};for(var E in F){D[E]=G.style[E];G.style[E]=F[E]}H.call(G);for(var E in F){G.style[E]=D[E]}},css:function(F,D,H){if(D=="width"||D=="height"){var J,E={position:"absolute",visibility:"hidden",display:"block"},I=D=="width"?["Left","Right"]:["Top","Bottom"];function G(){J=D=="width"?F.offsetWidth:F.offsetHeight;var L=0,K=0;n.each(I,function(){L+=parseFloat(n.curCSS(F,"padding"+this,true))||0;K+=parseFloat(n.curCSS(F,"border"+this+"Width",true))||0});J-=Math.round(L+K)}if(n(F).is(":visible")){G()}else{n.swap(F,E,G)}return Math.max(0,J)}return n.curCSS(F,D,H)},curCSS:function(H,E,F){var K,D=H.style;if(E=="opacity"&&!n.support.opacity){K=n.attr(D,"opacity");return K==""?"1":K}if(E.match(/float/i)){E=v}if(!F&&D&&D[E]){K=D[E]}else{if(p.getComputedStyle){if(E.match(/float/i)){E="float"}E=E.replace(/([A-Z])/g,"-$1").toLowerCase();var L=p.getComputedStyle(H,null);if(L){K=L.getPropertyValue(E)}if(E=="opacity"&&K==""){K="1"}}else{if(H.currentStyle){var I=E.replace(/\-(\w)/g,function(M,N){return N.toUpperCase()});K=H.currentStyle[E]||H.currentStyle[I];if(!/^\d+(px)?$/i.test(K)&&/^\d/.test(K)){var G=D.left,J=H.runtimeStyle.left;H.runtimeStyle.left=H.currentStyle.left;D.left=K||0;K=D.pixelLeft+"px";D.left=G;H.runtimeStyle.left=J}}}}return K},clean:function(E,J,H){J=J||document;if(typeof J.createElement==="undefined"){J=J.ownerDocument||J[0]&&J[0].ownerDocument||document}if(!H&&E.length===1&&typeof E[0]==="string"){var G=/^<(\w+)\s*\/?>$/.exec(E[0]);if(G){return[J.createElement(G[1])]}}var F=[],D=[],K=J.createElement("div");n.each(E,function(O,Q){if(typeof Q==="number"){Q+=""}if(!Q){return}if(typeof Q==="string"){Q=Q.replace(/(<(\w+)[^>]*?)\/>/g,function(S,T,R){return R.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?S:T+">"});var N=n.trim(Q).toLowerCase();var P=!N.indexOf("",""]||!N.indexOf("",""]||N.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!N.indexOf("",""]||(!N.indexOf("",""]||!N.indexOf("",""]||!n.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];K.innerHTML=P[1]+Q+P[2];while(P[0]--){K=K.lastChild}if(!n.support.tbody){var M=!N.indexOf(""&&N.indexOf("=0;--L){if(n.nodeName(M[L],"tbody")&&!M[L].childNodes.length){M[L].parentNode.removeChild(M[L])}}}if(!n.support.leadingWhitespace&&/^\s/.test(Q)){K.insertBefore(J.createTextNode(Q.match(/^\s*/)[0]),K.firstChild)}Q=n.makeArray(K.childNodes)}if(Q.nodeType){F.push(Q)}else{F=n.merge(F,Q)}});if(H){for(var I=0;F[I];I++){if(n.nodeName(F[I],"script")&&(!F[I].type||F[I].type.toLowerCase()==="text/javascript")){D.push(F[I].parentNode?F[I].parentNode.removeChild(F[I]):F[I])}else{if(F[I].nodeType===1){F.splice.apply(F,[I+1,0].concat(n.makeArray(F[I].getElementsByTagName("script"))))}H.appendChild(F[I])}}return D}return F},attr:function(I,F,J){if(!I||I.nodeType==3||I.nodeType==8){return g}var G=!n.isXMLDoc(I),K=J!==g;F=G&&n.props[F]||F;if(I.tagName){var E=/href|src|style/.test(F);if(F=="selected"&&I.parentNode){I.parentNode.selectedIndex}if(F in I&&G&&!E){if(K){if(F=="type"&&n.nodeName(I,"input")&&I.parentNode){throw"type property can't be changed"}I[F]=J}if(n.nodeName(I,"form")&&I.getAttributeNode(F)){return I.getAttributeNode(F).nodeValue}if(F=="tabIndex"){var H=I.getAttributeNode("tabIndex");return H&&H.specified?H.value:I.nodeName.match(/^(a|area|button|input|object|select|textarea)$/i)?0:g}return I[F]}if(!n.support.style&&G&&F=="style"){return n.attr(I.style,"cssText",J)}if(K){I.setAttribute(F,""+J)}var D=!n.support.hrefNormalized&&G&&E?I.getAttribute(F,2):I.getAttribute(F);return D===null?g:D}if(!n.support.opacity&&F=="opacity"){if(K){I.zoom=1;I.filter=(I.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(J)+""=="NaN"?"":"alpha(opacity="+J*100+")")}return I.filter&&I.filter.indexOf("opacity=")>=0?(parseFloat(I.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}F=F.replace(/-([a-z])/ig,function(L,M){return M.toUpperCase()});if(K){I[F]=J}return I[F]},trim:function(D){return(D||"").replace(/^\s+|\s+$/g,"")},makeArray:function(F){var D=[];if(F!=null){var E=F.length;if(E==null||typeof F==="string"||n.isFunction(F)||F.setInterval){D[0]=F}else{while(E){D[--E]=F[E]}}}return D},inArray:function(F,G){for(var D=0,E=G.length;D*",this).remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(D,E){n.fn[D]=function(){return this.each(E,arguments)}});function j(D,E){return D[0]&&parseInt(n.curCSS(D[0],E,true),10)||0}var h="jQuery"+e(),u=0,z={};n.extend({cache:{},data:function(E,D,F){E=E==l?z:E;var G=E[h];if(!G){G=E[h]=++u}if(D&&!n.cache[G]){n.cache[G]={}}if(F!==g){n.cache[G][D]=F}return D?n.cache[G][D]:G},removeData:function(E,D){E=E==l?z:E;var G=E[h];if(D){if(n.cache[G]){delete n.cache[G][D];D="";for(D in n.cache[G]){break}if(!D){n.removeData(E)}}}else{try{delete E[h]}catch(F){if(E.removeAttribute){E.removeAttribute(h)}}delete n.cache[G]}},queue:function(E,D,G){if(E){D=(D||"fx")+"queue";var F=n.data(E,D);if(!F||n.isArray(G)){F=n.data(E,D,n.makeArray(G))}else{if(G){F.push(G)}}}return F},dequeue:function(G,F){var D=n.queue(G,F),E=D.shift();if(!F||F==="fx"){E=D[0]}if(E!==g){E.call(G)}}});n.fn.extend({data:function(D,F){var G=D.split(".");G[1]=G[1]?"."+G[1]:"";if(F===g){var E=this.triggerHandler("getData"+G[1]+"!",[G[0]]);if(E===g&&this.length){E=n.data(this[0],D)}return E===g&&G[1]?this.data(G[0]):E}else{return this.trigger("setData"+G[1]+"!",[G[0],F]).each(function(){n.data(this,D,F)})}},removeData:function(D){return this.each(function(){n.removeData(this,D)})},queue:function(D,E){if(typeof D!=="string"){E=D;D="fx"}if(E===g){return n.queue(this[0],D)}return this.each(function(){var F=n.queue(this,D,E);if(D=="fx"&&F.length==1){F[0].call(this)}})},dequeue:function(D){return this.each(function(){n.dequeue(this,D)})}}); -/* - * Sizzle CSS Selector Engine - v0.9.1 - * Copyright 2009, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){var N=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|[^[\]]+)+\]|\\.|[^ >+~,(\[]+)+|[>+~])(\s*,\s*)?/g,I=0,F=Object.prototype.toString;var E=function(ae,S,aa,V){aa=aa||[];S=S||document;if(S.nodeType!==1&&S.nodeType!==9){return[]}if(!ae||typeof ae!=="string"){return aa}var ab=[],ac,Y,ah,ag,Z,R,Q=true;N.lastIndex=0;while((ac=N.exec(ae))!==null){ab.push(ac[1]);if(ac[2]){R=RegExp.rightContext;break}}if(ab.length>1&&G.match.POS.exec(ae)){if(ab.length===2&&G.relative[ab[0]]){var U="",X;while((X=G.match.POS.exec(ae))){U+=X[0];ae=ae.replace(G.match.POS,"")}Y=E.filter(U,E(/\s$/.test(ae)?ae+"*":ae,S))}else{Y=G.relative[ab[0]]?[S]:E(ab.shift(),S);while(ab.length){var P=[];ae=ab.shift();if(G.relative[ae]){ae+=ab.shift()}for(var af=0,ad=Y.length;af0){ah=D(Y)}else{Q=false}while(ab.length){var T=ab.pop(),W=T;if(!G.relative[T]){T=""}else{W=ab.pop()}if(W==null){W=S}G.relative[T](ah,W,M(S))}}if(!ah){ah=Y}if(!ah){throw"Syntax error, unrecognized expression: "+(T||ae)}if(F.call(ah)==="[object Array]"){if(!Q){aa.push.apply(aa,ah)}else{if(S.nodeType===1){for(var af=0;ah[af]!=null;af++){if(ah[af]&&(ah[af]===true||ah[af].nodeType===1&&H(S,ah[af]))){aa.push(Y[af])}}}else{for(var af=0;ah[af]!=null;af++){if(ah[af]&&ah[af].nodeType===1){aa.push(Y[af])}}}}}else{D(ah,aa)}if(R){E(R,S,aa,V)}return aa};E.matches=function(P,Q){return E(P,null,null,Q)};E.find=function(V,S){var W,Q;if(!V){return[]}for(var R=0,P=G.order.length;R":function(U,Q,V){if(typeof Q==="string"&&!/\W/.test(Q)){Q=V?Q:Q.toUpperCase();for(var R=0,P=U.length;R=0){if(!R){P.push(Q[T])}}else{if(R){Q[T]=false}}}return false},ID:function(P){return P[1].replace(/\\/g,"")},TAG:function(Q,P){for(var R=0;!P[R];R++){}return M(P[R])?Q[1]:Q[1].toUpperCase()},CHILD:function(P){if(P[1]=="nth"){var Q=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(P[2]=="even"&&"2n"||P[2]=="odd"&&"2n+1"||!/\D/.test(P[2])&&"0n+"+P[2]||P[2]);P[2]=(Q[1]+(Q[2]||1))-0;P[3]=Q[3]-0}P[0]="done"+(I++);return P},ATTR:function(Q){var P=Q[1];if(G.attrMap[P]){Q[1]=G.attrMap[P]}if(Q[2]==="~="){Q[4]=" "+Q[4]+" "}return Q},PSEUDO:function(T,Q,R,P,U){if(T[1]==="not"){if(T[3].match(N).length>1){T[3]=E(T[3],null,null,Q)}else{var S=E.filter(T[3],Q,R,true^U);if(!R){P.push.apply(P,S)}return false}}else{if(G.match.POS.test(T[0])){return true}}return T},POS:function(P){P.unshift(true);return P}},filters:{enabled:function(P){return P.disabled===false&&P.type!=="hidden"},disabled:function(P){return P.disabled===true},checked:function(P){return P.checked===true},selected:function(P){P.parentNode.selectedIndex;return P.selected===true},parent:function(P){return !!P.firstChild},empty:function(P){return !P.firstChild},has:function(R,Q,P){return !!E(P[3],R).length},header:function(P){return/h\d/i.test(P.nodeName)},text:function(P){return"text"===P.type},radio:function(P){return"radio"===P.type},checkbox:function(P){return"checkbox"===P.type},file:function(P){return"file"===P.type},password:function(P){return"password"===P.type},submit:function(P){return"submit"===P.type},image:function(P){return"image"===P.type},reset:function(P){return"reset"===P.type},button:function(P){return"button"===P.type||P.nodeName.toUpperCase()==="BUTTON"},input:function(P){return/input|select|textarea|button/i.test(P.nodeName)}},setFilters:{first:function(Q,P){return P===0},last:function(R,Q,P,S){return Q===S.length-1},even:function(Q,P){return P%2===0},odd:function(Q,P){return P%2===1},lt:function(R,Q,P){return QP[3]-0},nth:function(R,Q,P){return P[3]-0==Q},eq:function(R,Q,P){return P[3]-0==Q}},filter:{CHILD:function(P,S){var V=S[1],W=P.parentNode;var U="child"+W.childNodes.length;if(W&&(!W[U]||!P.nodeIndex)){var T=1;for(var Q=W.firstChild;Q;Q=Q.nextSibling){if(Q.nodeType==1){Q.nodeIndex=T++}}W[U]=T-1}if(V=="first"){return P.nodeIndex==1}else{if(V=="last"){return P.nodeIndex==W[U]}else{if(V=="only"){return W[U]==1}else{if(V=="nth"){var Y=false,R=S[2],X=S[3];if(R==1&&X==0){return true}if(R==0){if(P.nodeIndex==X){Y=true}}else{if((P.nodeIndex-X)%R==0&&(P.nodeIndex-X)/R>=0){Y=true}}return Y}}}}},PSEUDO:function(V,R,S,W){var Q=R[1],T=G.filters[Q];if(T){return T(V,S,R,W)}else{if(Q==="contains"){return(V.textContent||V.innerText||"").indexOf(R[3])>=0}else{if(Q==="not"){var U=R[3];for(var S=0,P=U.length;S=0:S==="~="?(" "+U+" ").indexOf(Q)>=0:!R[4]?P:S==="!="?U!=Q:S==="^="?U.indexOf(Q)===0:S==="$="?U.substr(U.length-Q.length)===Q:S==="|="?U===Q||U.substr(0,Q.length+1)===Q+"-":false},POS:function(T,Q,R,U){var P=Q[2],S=G.setFilters[P];if(S){return S(T,R,Q,U)}}}};for(var K in G.match){G.match[K]=RegExp(G.match[K].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var D=function(Q,P){Q=Array.prototype.slice.call(Q);if(P){P.push.apply(P,Q);return P}return Q};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(J){D=function(T,S){var Q=S||[];if(F.call(T)==="[object Array]"){Array.prototype.push.apply(Q,T)}else{if(typeof T.length==="number"){for(var R=0,P=T.length;R";var P=document.documentElement;P.insertBefore(Q,P.firstChild);if(!!document.getElementById(R)){G.find.ID=function(T,U){if(U.getElementById){var S=U.getElementById(T[1]);return S?S.id===T[1]||S.getAttributeNode&&S.getAttributeNode("id").nodeValue===T[1]?[S]:g:[]}};G.filter.ID=function(U,S){var T=U.getAttributeNode&&U.getAttributeNode("id");return U.nodeType===1&&T&&T.nodeValue===S}}P.removeChild(Q)})();(function(){var P=document.createElement("div");P.appendChild(document.createComment(""));if(P.getElementsByTagName("*").length>0){G.find.TAG=function(Q,U){var T=U.getElementsByTagName(Q[1]);if(Q[1]==="*"){var S=[];for(var R=0;T[R];R++){if(T[R].nodeType===1){S.push(T[R])}}T=S}return T}}P.innerHTML="";if(P.firstChild.getAttribute("href")!=="#"){G.attrHandle.href=function(Q){return Q.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var P=E;E=function(T,S,Q,R){S=S||document;if(!R&&S.nodeType===9){try{return D(S.querySelectorAll(T),Q)}catch(U){}}return P(T,S,Q,R)};E.find=P.find;E.filter=P.filter;E.selectors=P.selectors;E.matches=P.matches})()}if(document.documentElement.getElementsByClassName){G.order.splice(1,0,"CLASS");G.find.CLASS=function(P,Q){return Q.getElementsByClassName(P[1])}}function L(Q,W,V,Z,X,Y){for(var T=0,R=Z.length;T0){T=P;break}}}P=P[Q]}Y[S]=T}}}var H=document.compareDocumentPosition?function(Q,P){return Q.compareDocumentPosition(P)&16}:function(Q,P){return Q!==P&&(Q.contains?Q.contains(P):true)};var M=function(P){return P.documentElement&&!P.body||P.tagName&&P.ownerDocument&&!P.ownerDocument.body};n.find=E;n.filter=E.filter;n.expr=E.selectors;n.expr[":"]=n.expr.filters;E.selectors.filters.hidden=function(P){return"hidden"===P.type||n.css(P,"display")==="none"||n.css(P,"visibility")==="hidden"};E.selectors.filters.visible=function(P){return"hidden"!==P.type&&n.css(P,"display")!=="none"&&n.css(P,"visibility")!=="hidden"};E.selectors.filters.animated=function(P){return n.grep(n.timers,function(Q){return P===Q.elem}).length};n.multiFilter=function(R,P,Q){if(Q){R=":not("+R+")"}return E.matches(R,P)};n.dir=function(R,Q){var P=[],S=R[Q];while(S&&S!=document){if(S.nodeType==1){P.push(S)}S=S[Q]}return P};n.nth=function(T,P,R,S){P=P||1;var Q=0;for(;T;T=T[R]){if(T.nodeType==1&&++Q==P){break}}return T};n.sibling=function(R,Q){var P=[];for(;R;R=R.nextSibling){if(R.nodeType==1&&R!=Q){P.push(R)}}return P};return;l.Sizzle=E})();n.event={add:function(H,E,G,J){if(H.nodeType==3||H.nodeType==8){return}if(H.setInterval&&H!=l){H=l}if(!G.guid){G.guid=this.guid++}if(J!==g){var F=G;G=this.proxy(F);G.data=J}var D=n.data(H,"events")||n.data(H,"events",{}),I=n.data(H,"handle")||n.data(H,"handle",function(){return typeof n!=="undefined"&&!n.event.triggered?n.event.handle.apply(arguments.callee.elem,arguments):g});I.elem=H;n.each(E.split(/\s+/),function(L,M){var N=M.split(".");M=N.shift();G.type=N.slice().sort().join(".");var K=D[M];if(n.event.specialAll[M]){n.event.specialAll[M].setup.call(H,J,N)}if(!K){K=D[M]={};if(!n.event.special[M]||n.event.special[M].setup.call(H,J,N)===false){if(H.addEventListener){H.addEventListener(M,I,false)}else{if(H.attachEvent){H.attachEvent("on"+M,I)}}}}K[G.guid]=G;n.event.global[M]=true});H=null},guid:1,global:{},remove:function(J,G,I){if(J.nodeType==3||J.nodeType==8){return}var F=n.data(J,"events"),E,D;if(F){if(G===g||(typeof G==="string"&&G.charAt(0)==".")){for(var H in F){this.remove(J,H+(G||""))}}else{if(G.type){I=G.handler;G=G.type}n.each(G.split(/\s+/),function(L,N){var P=N.split(".");N=P.shift();var M=RegExp("(^|\\.)"+P.slice().sort().join(".*\\.")+"(\\.|$)");if(F[N]){if(I){delete F[N][I.guid]}else{for(var O in F[N]){if(M.test(F[N][O].type)){delete F[N][O]}}}if(n.event.specialAll[N]){n.event.specialAll[N].teardown.call(J,P)}for(E in F[N]){break}if(!E){if(!n.event.special[N]||n.event.special[N].teardown.call(J,P)===false){if(J.removeEventListener){J.removeEventListener(N,n.data(J,"handle"),false)}else{if(J.detachEvent){J.detachEvent("on"+N,n.data(J,"handle"))}}}E=null;delete F[N]}}})}for(E in F){break}if(!E){var K=n.data(J,"handle");if(K){K.elem=null}n.removeData(J,"events");n.removeData(J,"handle")}}},trigger:function(H,J,G,D){var F=H.type||H;if(!D){H=typeof H==="object"?H[h]?H:n.extend(n.Event(F),H):n.Event(F);if(F.indexOf("!")>=0){H.type=F=F.slice(0,-1);H.exclusive=true}if(!G){H.stopPropagation();if(this.global[F]){n.each(n.cache,function(){if(this.events&&this.events[F]){n.event.trigger(H,J,this.handle.elem)}})}}if(!G||G.nodeType==3||G.nodeType==8){return g}H.result=g;H.target=G;J=n.makeArray(J);J.unshift(H)}H.currentTarget=G;var I=n.data(G,"handle");if(I){I.apply(G,J)}if((!G[F]||(n.nodeName(G,"a")&&F=="click"))&&G["on"+F]&&G["on"+F].apply(G,J)===false){H.result=false}if(!D&&G[F]&&!H.isDefaultPrevented()&&!(n.nodeName(G,"a")&&F=="click")){this.triggered=true;try{G[F]()}catch(K){}}this.triggered=false;if(!H.isPropagationStopped()){var E=G.parentNode||G.ownerDocument;if(E){n.event.trigger(H,J,E,true)}}},handle:function(J){var I,D;J=arguments[0]=n.event.fix(J||l.event);var K=J.type.split(".");J.type=K.shift();I=!K.length&&!J.exclusive;var H=RegExp("(^|\\.)"+K.slice().sort().join(".*\\.")+"(\\.|$)");D=(n.data(this,"events")||{})[J.type];for(var F in D){var G=D[F];if(I||H.test(G.type)){J.handler=G;J.data=G.data;var E=G.apply(this,arguments);if(E!==g){J.result=E;if(E===false){J.preventDefault();J.stopPropagation()}}if(J.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(G){if(G[h]){return G}var E=G;G=n.Event(E);for(var F=this.props.length,I;F;){I=this.props[--F];G[I]=E[I]}if(!G.target){G.target=G.srcElement||document}if(G.target.nodeType==3){G.target=G.target.parentNode}if(!G.relatedTarget&&G.fromElement){G.relatedTarget=G.fromElement==G.target?G.toElement:G.fromElement}if(G.pageX==null&&G.clientX!=null){var H=document.documentElement,D=document.body;G.pageX=G.clientX+(H&&H.scrollLeft||D&&D.scrollLeft||0)-(H.clientLeft||0);G.pageY=G.clientY+(H&&H.scrollTop||D&&D.scrollTop||0)-(H.clientTop||0)}if(!G.which&&((G.charCode||G.charCode===0)?G.charCode:G.keyCode)){G.which=G.charCode||G.keyCode}if(!G.metaKey&&G.ctrlKey){G.metaKey=G.ctrlKey}if(!G.which&&G.button){G.which=(G.button&1?1:(G.button&2?3:(G.button&4?2:0)))}return G},proxy:function(E,D){D=D||function(){return E.apply(this,arguments)};D.guid=E.guid=E.guid||D.guid||this.guid++;return D},special:{ready:{setup:A,teardown:function(){}}},specialAll:{live:{setup:function(D,E){n.event.add(this,E[0],c)},teardown:function(F){if(F.length){var D=0,E=RegExp("(^|\\.)"+F[0]+"(\\.|$)");n.each((n.data(this,"events").live||{}),function(){if(E.test(this.type)){D++}});if(D<1){n.event.remove(this,F[0],c)}}}}}};n.Event=function(D){if(!this.preventDefault){return new n.Event(D)}if(D&&D.type){this.originalEvent=D;this.type=D.type;this.timeStamp=D.timeStamp}else{this.type=D}if(!this.timeStamp){this.timeStamp=e()}this[h]=true};function k(){return false}function t(){return true}n.Event.prototype={preventDefault:function(){this.isDefaultPrevented=t;var D=this.originalEvent;if(!D){return}if(D.preventDefault){D.preventDefault()}D.returnValue=false},stopPropagation:function(){this.isPropagationStopped=t;var D=this.originalEvent;if(!D){return}if(D.stopPropagation){D.stopPropagation()}D.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=t;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(E){var D=E.relatedTarget;while(D&&D!=this){try{D=D.parentNode}catch(F){D=this}}if(D!=this){E.type=E.data;n.event.handle.apply(this,arguments)}};n.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(E,D){n.event.special[D]={setup:function(){n.event.add(this,E,a,D)},teardown:function(){n.event.remove(this,E,a)}}});n.fn.extend({bind:function(E,F,D){return E=="unload"?this.one(E,F,D):this.each(function(){n.event.add(this,E,D||F,D&&F)})},one:function(F,G,E){var D=n.event.proxy(E||G,function(H){n(this).unbind(H,D);return(E||G).apply(this,arguments)});return this.each(function(){n.event.add(this,F,D,E&&G)})},unbind:function(E,D){return this.each(function(){n.event.remove(this,E,D)})},trigger:function(D,E){return this.each(function(){n.event.trigger(D,E,this)})},triggerHandler:function(D,F){if(this[0]){var E=n.Event(D);E.preventDefault();E.stopPropagation();n.event.trigger(E,F,this[0]);return E.result}},toggle:function(F){var D=arguments,E=1;while(E=0){var D=F.slice(H,F.length);F=F.slice(0,H)}var G="GET";if(I){if(n.isFunction(I)){J=I;I=null}else{if(typeof I==="object"){I=n.param(I);G="POST"}}}var E=this;n.ajax({url:F,type:G,dataType:"html",data:I,complete:function(L,K){if(K=="success"||K=="notmodified"){E.html(D?n("
").append(L.responseText.replace(//g,"")).find(D):L.responseText)}if(J){E.each(J,[L.responseText,K,L])}}});return this},serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?n.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))}).map(function(D,E){var F=n(this).val();return F==null?null:n.isArray(F)?n.map(F,function(H,G){return{name:E.name,value:H}}):{name:E.name,value:F}}).get()}});n.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(D,E){n.fn[E]=function(F){return this.bind(E,F)}});var q=e();n.extend({get:function(D,F,G,E){if(n.isFunction(F)){G=F;F=null}return n.ajax({type:"GET",url:D,data:F,success:G,dataType:E})},getScript:function(D,E){return n.get(D,null,E,"script")},getJSON:function(D,E,F){return n.get(D,E,F,"json")},post:function(D,F,G,E){if(n.isFunction(F)){G=F;F={}}return n.ajax({type:"POST",url:D,data:F,success:G,dataType:E})},ajaxSetup:function(D){n.extend(n.ajaxSettings,D)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(L){L=n.extend(true,L,n.extend(true,{},n.ajaxSettings,L));var V,E=/=\?(&|$)/g,Q,U,F=L.type.toUpperCase();if(L.data&&L.processData&&typeof L.data!=="string"){L.data=n.param(L.data)}if(L.dataType=="jsonp"){if(F=="GET"){if(!L.url.match(E)){L.url+=(L.url.match(/\?/)?"&":"?")+(L.jsonp||"callback")+"=?"}}else{if(!L.data||!L.data.match(E)){L.data=(L.data?L.data+"&":"")+(L.jsonp||"callback")+"=?"}}L.dataType="json"}if(L.dataType=="json"&&(L.data&&L.data.match(E)||L.url.match(E))){V="jsonp"+q++;if(L.data){L.data=(L.data+"").replace(E,"="+V+"$1")}L.url=L.url.replace(E,"="+V+"$1");L.dataType="script";l[V]=function(W){U=W;H();K();l[V]=g;try{delete l[V]}catch(X){}if(G){G.removeChild(S)}}}if(L.dataType=="script"&&L.cache==null){L.cache=false}if(L.cache===false&&F=="GET"){var D=e();var T=L.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+D+"$2");L.url=T+((T==L.url)?(L.url.match(/\?/)?"&":"?")+"_="+D:"")}if(L.data&&F=="GET"){L.url+=(L.url.match(/\?/)?"&":"?")+L.data;L.data=null}if(L.global&&!n.active++){n.event.trigger("ajaxStart")}var P=/^(\w+:)?\/\/([^\/?#]+)/.exec(L.url);if(L.dataType=="script"&&F=="GET"&&P&&(P[1]&&P[1]!=location.protocol||P[2]!=location.host)){var G=document.getElementsByTagName("head")[0];var S=document.createElement("script");S.src=L.url;if(L.scriptCharset){S.charset=L.scriptCharset}if(!V){var N=false;S.onload=S.onreadystatechange=function(){if(!N&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){N=true;H();K();G.removeChild(S)}}}G.appendChild(S);return g}var J=false;var I=L.xhr();if(L.username){I.open(F,L.url,L.async,L.username,L.password)}else{I.open(F,L.url,L.async)}try{if(L.data){I.setRequestHeader("Content-Type",L.contentType)}if(L.ifModified){I.setRequestHeader("If-Modified-Since",n.lastModified[L.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}I.setRequestHeader("X-Requested-With","XMLHttpRequest");I.setRequestHeader("Accept",L.dataType&&L.accepts[L.dataType]?L.accepts[L.dataType]+", */*":L.accepts._default)}catch(R){}if(L.beforeSend&&L.beforeSend(I,L)===false){if(L.global&&!--n.active){n.event.trigger("ajaxStop")}I.abort();return false}if(L.global){n.event.trigger("ajaxSend",[I,L])}var M=function(W){if(I.readyState==0){if(O){clearInterval(O);O=null;if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}}else{if(!J&&I&&(I.readyState==4||W=="timeout")){J=true;if(O){clearInterval(O);O=null}Q=W=="timeout"?"timeout":!n.httpSuccess(I)?"error":L.ifModified&&n.httpNotModified(I,L.url)?"notmodified":"success";if(Q=="success"){try{U=n.httpData(I,L.dataType,L)}catch(Y){Q="parsererror"}}if(Q=="success"){var X;try{X=I.getResponseHeader("Last-Modified")}catch(Y){}if(L.ifModified&&X){n.lastModified[L.url]=X}if(!V){H()}}else{n.handleError(L,I,Q)}K();if(L.async){I=null}}}};if(L.async){var O=setInterval(M,13);if(L.timeout>0){setTimeout(function(){if(I){if(!J){M("timeout")}if(I){I.abort()}}},L.timeout)}}try{I.send(L.data)}catch(R){n.handleError(L,I,null,R)}if(!L.async){M()}function H(){if(L.success){L.success(U,Q)}if(L.global){n.event.trigger("ajaxSuccess",[I,L])}}function K(){if(L.complete){L.complete(I,Q)}if(L.global){n.event.trigger("ajaxComplete",[I,L])}if(L.global&&!--n.active){n.event.trigger("ajaxStop")}}return I},handleError:function(E,G,D,F){if(E.error){E.error(G,D,F)}if(E.global){n.event.trigger("ajaxError",[G,E,F])}},active:0,httpSuccess:function(E){try{return !E.status&&location.protocol=="file:"||(E.status>=200&&E.status<300)||E.status==304||E.status==1223}catch(D){}return false},httpNotModified:function(F,D){try{var G=F.getResponseHeader("Last-Modified");return F.status==304||G==n.lastModified[D]}catch(E){}return false},httpData:function(I,G,F){var E=I.getResponseHeader("content-type"),D=G=="xml"||!G&&E&&E.indexOf("xml")>=0,H=D?I.responseXML:I.responseText;if(D&&H.documentElement.tagName=="parsererror"){throw"parsererror"}if(F&&F.dataFilter){H=F.dataFilter(H,G)}if(typeof H==="string"){if(G=="script"){n.globalEval(H)}if(G=="json"){H=l["eval"]("("+H+")")}}return H},param:function(D){var F=[];function G(H,I){F[F.length]=encodeURIComponent(H)+"="+encodeURIComponent(I)}if(n.isArray(D)||D.jquery){n.each(D,function(){G(this.name,this.value)})}else{for(var E in D){if(n.isArray(D[E])){n.each(D[E],function(){G(E,this)})}else{G(E,n.isFunction(D[E])?D[E]():D[E])}}}return F.join("&").replace(/%20/g,"+")}});var m={},d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function s(E,D){var F={};n.each(d.concat.apply([],d.slice(0,D)),function(){F[this]=E});return F}n.fn.extend({show:function(I,K){if(I){return this.animate(s("show",3),I,K)}else{for(var G=0,E=this.length;G").appendTo("body");J=H.css("display");if(J==="none"){J="block"}H.remove();m[F]=J}this[G].style.display=n.data(this[G],"olddisplay",J)}}return this}},hide:function(G,H){if(G){return this.animate(s("hide",3),G,H)}else{for(var F=0,E=this.length;F=0;G--){if(F[G].elem==this){if(D){F[G](true)}F.splice(G,1)}}});if(!D){this.dequeue()}return this}});n.each({slideDown:s("show",1),slideUp:s("hide",1),slideToggle:s("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(D,E){n.fn[D]=function(F,G){return this.animate(E,F,G)}});n.extend({speed:function(F,G,E){var D=typeof F==="object"?F:{complete:E||!E&&G||n.isFunction(F)&&F,duration:F,easing:E&&G||G&&!n.isFunction(G)&&G};D.duration=n.fx.off?0:typeof D.duration==="number"?D.duration:n.fx.speeds[D.duration]||n.fx.speeds._default;D.old=D.complete;D.complete=function(){if(D.queue!==false){n(this).dequeue()}if(n.isFunction(D.old)){D.old.call(this)}};return D},easing:{linear:function(F,G,D,E){return D+E*F},swing:function(F,G,D,E){return((-Math.cos(F*Math.PI)/2)+0.5)*E+D}},timers:[],timerId:null,fx:function(E,D,F){this.options=D;this.elem=E;this.prop=F;if(!D.orig){D.orig={}}}});n.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(n.fx.step[this.prop]||n.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(E){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var D=parseFloat(n.css(this.elem,this.prop,E));return D&&D>-10000?D:parseFloat(n.curCSS(this.elem,this.prop))||0},custom:function(H,G,F){this.startTime=e();this.start=H;this.end=G;this.unit=F||this.unit||"px";this.now=this.start;this.pos=this.state=0;var D=this;function E(I){return D.step(I)}E.elem=this.elem;n.timers.push(E);if(E()&&n.timerId==null){n.timerId=setInterval(function(){var J=n.timers;for(var I=0;I=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var D=true;for(var E in this.options.curAnim){if(this.options.curAnim[E]!==true){D=false}}if(D){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(n.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){n(this.elem).hide()}if(this.options.hide||this.options.show){for(var H in this.options.curAnim){n.attr(this.elem.style,H,this.options.orig[H])}}}if(D){this.options.complete.call(this.elem)}return false}else{var I=F-this.startTime;this.state=I/this.options.duration;this.pos=n.easing[this.options.easing||(n.easing.swing?"swing":"linear")](this.state,I,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};n.extend(n.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(D){n.attr(D.elem.style,"opacity",D.now)},_default:function(D){if(D.elem.style&&D.elem.style[D.prop]!=null){D.elem.style[D.prop]=D.now+D.unit}else{D.elem[D.prop]=D.now}}}});if(document.documentElement.getBoundingClientRect){n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}var F=this[0].getBoundingClientRect(),I=this[0].ownerDocument,E=I.body,D=I.documentElement,K=D.clientTop||E.clientTop||0,J=D.clientLeft||E.clientLeft||0,H=F.top+(self.pageYOffset||n.boxModel&&D.scrollTop||E.scrollTop)-K,G=F.left+(self.pageXOffset||n.boxModel&&D.scrollLeft||E.scrollLeft)-J;return{top:H,left:G}}}else{n.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return n.offset.bodyOffset(this[0])}n.offset.initialized||n.offset.initialize();var I=this[0],F=I.offsetParent,E=I,N=I.ownerDocument,L,G=N.documentElement,J=N.body,K=N.defaultView,D=K.getComputedStyle(I,null),M=I.offsetTop,H=I.offsetLeft;while((I=I.parentNode)&&I!==J&&I!==G){L=K.getComputedStyle(I,null);M-=I.scrollTop,H-=I.scrollLeft;if(I===F){M+=I.offsetTop,H+=I.offsetLeft;if(n.offset.doesNotAddBorder&&!(n.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(I.tagName))){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}E=F,F=I.offsetParent}if(n.offset.subtractsBorderForOverflowNotVisible&&L.overflow!=="visible"){M+=parseInt(L.borderTopWidth,10)||0,H+=parseInt(L.borderLeftWidth,10)||0}D=L}if(D.position==="relative"||D.position==="static"){M+=J.offsetTop,H+=J.offsetLeft}if(D.position==="fixed"){M+=Math.max(G.scrollTop,J.scrollTop),H+=Math.max(G.scrollLeft,J.scrollLeft)}return{top:M,left:H}}}n.offset={initialize:function(){if(this.initialized){return}var K=document.body,E=document.createElement("div"),G,F,M,H,L,D,I=K.style.marginTop,J='
';L={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(D in L){E.style[D]=L[D]}E.innerHTML=J;K.insertBefore(E,K.firstChild);G=E.firstChild,F=G.firstChild,H=G.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(F.offsetTop!==5);this.doesAddBorderForTableAndCells=(H.offsetTop===5);G.style.overflow="hidden",G.style.position="relative";this.subtractsBorderForOverflowNotVisible=(F.offsetTop===-5);K.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(K.offsetTop===0);K.style.marginTop=I;K.removeChild(E);this.initialized=true},bodyOffset:function(D){n.offset.initialized||n.offset.initialize();var F=D.offsetTop,E=D.offsetLeft;if(n.offset.doesNotIncludeMarginInBodyOffset){F+=parseInt(n.curCSS(D,"marginTop",true),10)||0,E+=parseInt(n.curCSS(D,"marginLeft",true),10)||0}return{top:F,left:E}}};n.fn.extend({position:function(){var H=0,G=0,E;if(this[0]){var F=this.offsetParent(),I=this.offset(),D=/^body|html$/i.test(F[0].tagName)?{top:0,left:0}:F.offset();I.top-=j(this,"marginTop");I.left-=j(this,"marginLeft");D.top+=j(F,"borderTopWidth");D.left+=j(F,"borderLeftWidth");E={top:I.top-D.top,left:I.left-D.left}}return E},offsetParent:function(){var D=this[0].offsetParent||document.body;while(D&&(!/^body|html$/i.test(D.tagName)&&n.css(D,"position")=="static")){D=D.offsetParent}return n(D)}});n.each(["Left","Top"],function(E,D){var F="scroll"+D;n.fn[F]=function(G){if(!this[0]){return null}return G!==g?this.each(function(){this==l||this==document?l.scrollTo(!E?G:n(l).scrollLeft(),E?G:n(l).scrollTop()):this[F]=G}):this[0]==l||this[0]==document?self[E?"pageYOffset":"pageXOffset"]||n.boxModel&&document.documentElement[F]||document.body[F]:this[0][F]}});n.each(["Height","Width"],function(G,E){var D=G?"Left":"Top",F=G?"Right":"Bottom";n.fn["inner"+E]=function(){return this[E.toLowerCase()]()+j(this,"padding"+D)+j(this,"padding"+F)};n.fn["outer"+E]=function(I){return this["inner"+E]()+j(this,"border"+D+"Width")+j(this,"border"+F+"Width")+(I?j(this,"margin"+D)+j(this,"margin"+F):0)};var H=E.toLowerCase();n.fn[H]=function(I){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+E]||document.body["client"+E]:this[0]==document?Math.max(document.documentElement["client"+E],document.body["scroll"+E],document.documentElement["scroll"+E],document.body["offset"+E],document.documentElement["offset"+E]):I===g?(this.length?n.css(this[0],H):null):this.css(H,typeof I==="string"?I:I+"px")}})})(); \ No newline at end of file diff --git a/static/form_login/javascripts/jquery.pop.js b/static/form_login/javascripts/jquery.pop.js deleted file mode 100644 index c53d4e3..0000000 --- a/static/form_login/javascripts/jquery.pop.js +++ /dev/null @@ -1,63 +0,0 @@ -// -// pop! for jQuery -// v0.2 requires jQuery v1.2 or later -// -// Licensed under the MIT: -// http://www.opensource.org/licenses/mit-license.php -// -// Copyright 2007,2008 SEAOFCLOUDS [http://seaofclouds.com] -// - -(function($) { - - $.pop = function(options){ - - // settings - var settings = { - pop_class : '.pop', - pop_toggle_text : '' - } - - // inject html wrapper - function initpops (){ - $(settings.pop_class).each(function() { - var pop_classes = $(this).attr("class"); - $(this).addClass("pop_menu"); - $(this).wrap("
"); - $(".pop_menu").attr("class", "pop_menu"); - $(this).before(" \ -
"+settings.pop_toggle_text+"
\ - "); - }); - } - initpops(); - - // assign reverse z-indexes to each pop - var totalpops = $(settings.pop_class).size() + 1000; - $(settings.pop_class).each(function(i) { - var popzindex = totalpops - i; - $(this).css({ zIndex: popzindex }); - }); - // close pops if user clicks outside of pop - activePop = null; - function closeInactivePop() { - $(settings.pop_class).each(function (i) { - if ($(this).hasClass('active') && i!=activePop) { - $(this).removeClass('active'); - } - }); - return false; - } - $(settings.pop_class).mouseover(function() { activePop = $(settings.pop_class).index(this); }); - $(settings.pop_class).mouseout(function() { activePop = null; }); - - $(document.body).click(function(){ - closeInactivePop(); - }); - // toggle that pop - $(".pop_toggle").click(function(){ - $(this).parent(settings.pop_class).toggleClass("active"); - }); - } - -})(jQuery); \ No newline at end of file -- cgit v1.2.3-70-g09d2 From 188f1e79227fabfd46bf0feff460516414395364 Mon Sep 17 00:00:00 2001 From: timb Date: Fri, 15 Jan 2010 18:57:43 -0800 Subject: fixed up the default value for the login form fields and moved most of the javascript into static/js --- static/home.js | 36 --- static/index.html | 17 +- static/js/home.js | 58 ++++ static/js/pichat.js | 244 +++++++++++++++++ static/js/sha1.js | 330 +++++++++++++++++++++++ static/js/underscore-min.js | 16 ++ static/js/underscore.js | 637 ++++++++++++++++++++++++++++++++++++++++++++ static/pichat.js | 244 ----------------- static/sha1.js | 330 ----------------------- template/form_login.st | 4 +- template/head.st | 5 +- 11 files changed, 1294 insertions(+), 627 deletions(-) delete mode 100755 static/home.js create mode 100755 static/js/home.js create mode 100755 static/js/pichat.js create mode 100755 static/js/sha1.js create mode 100644 static/js/underscore-min.js create mode 100644 static/js/underscore.js delete mode 100755 static/pichat.js delete mode 100755 static/sha1.js (limited to 'static') diff --git a/static/home.js b/static/home.js deleted file mode 100755 index 7ced9da..0000000 --- a/static/home.js +++ /dev/null @@ -1,36 +0,0 @@ -function ifEnter(fn) { - return function(e) { - if (e.keyCode == 13) { fn(); } - }; -} - -function initHome() { - $('#passwordInput').keyup(ifEnter(login)); - $('#loginSubmit').click(login); -} - -function login() { - $('#passwordInput, #loginSubmit').blur(); - var nick = $('#nickInput').val(); - var password = $('#passwordInput').val(); - var hash = hex_sha1(nick + '$' + password + '$dumpfm'); - - var onSuccess = function(json) { - location.href = "/chat"; - }; - - var onError = function(resp, textStatus, errorThrown) { - alert("Error logging in!"); - }; - - $.ajax({ - type: 'GET', - timeout: 5000, - url: 'login', - data: {'nick': nick, ts: '', 'hash': hash }, - cache: false, - dataType: 'json', - success: onSuccess, - error: onError - }); -}; \ No newline at end of file diff --git a/static/index.html b/static/index.html index 0ed1671..cb1852b 100755 --- a/static/index.html +++ b/static/index.html @@ -1,7 +1,8 @@ - - + + + + - - + + + -- cgit v1.2.3-70-g09d2 From 0b435f081c7f9d9f5d2e351a6d7dc0fa2504c6ba Mon Sep 17 00:00:00 2001 From: timb Date: Fri, 15 Jan 2010 19:00:03 -0800 Subject: commentz --- static/js/home.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'static') diff --git a/static/js/home.js b/static/js/home.js index 910de02..b955d8a 100755 --- a/static/js/home.js +++ b/static/js/home.js @@ -15,12 +15,14 @@ function initHome() { // set default values for the login form only if empty if ($(id).val() == "") $(id).val(value); - + + // erase the form text when clicked only if it is filler text, otherwise select it $(id).focus(function(){ if($(id).val() == value) $(id).val("") else $(id).select() }) + // restore filler text on blur if field is empty $(id).blur(function(){ if($(id).val() == "") $(id).val(value); }) -- cgit v1.2.3-70-g09d2 From a9c5be252442f4e744c7d85923f2aa3564ae97aa Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sat, 16 Jan 2010 22:59:35 -0500 Subject: timb merging ryder's changes --- static/chanbg.png | Bin 0 -> 218 bytes static/date.js | 507 ++++++++++++++ static/datePicker.css | 129 ++++ static/gritter/css/jquery.gritter.css | 4 +- static/gritter/js/jquery.gritter.js | 2 +- static/jquery.datePicker.js | 1189 +++++++++++++++++++++++++++++++++ static/search/browser.html | 69 +- static/search/browser.png | Bin 11865 -> 6563 bytes static/talkwith.png | Bin 0 -> 2698 bytes 9 files changed, 1857 insertions(+), 43 deletions(-) create mode 100644 static/chanbg.png create mode 100644 static/date.js create mode 100644 static/datePicker.css create mode 100644 static/jquery.datePicker.js create mode 100644 static/talkwith.png (limited to 'static') diff --git a/static/chanbg.png b/static/chanbg.png new file mode 100644 index 0000000..331f4eb Binary files /dev/null and b/static/chanbg.png differ diff --git a/static/date.js b/static/date.js new file mode 100644 index 0000000..2312284 --- /dev/null +++ b/static/date.js @@ -0,0 +1,507 @@ +/* + * Date prototype extensions. Doesn't depend on any + * other code. Doens't overwrite existing methods. + * + * Adds dayNames, abbrDayNames, monthNames and abbrMonthNames static properties and isLeapYear, + * isWeekend, isWeekDay, getDaysInMonth, getDayName, getMonthName, getDayOfYear, getWeekOfYear, + * setDayOfYear, addYears, addMonths, addDays, addHours, addMinutes, addSeconds methods + * + * Copyright (c) 2006 Jörn Zaefferer and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) + * + * Additional methods and properties added by Kelvin Luck: firstDayOfWeek, dateFormat, zeroTime, asString, fromString - + * I've added my name to these methods so you know who to blame if they are broken! + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +/** + * An Array of day names starting with Sunday. + * + * @example dayNames[0] + * @result 'Sunday' + * + * @name dayNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; + +/** + * An Array of abbreviated day names starting with Sun. + * + * @example abbrDayNames[0] + * @result 'Sun' + * + * @name abbrDayNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.abbrDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + +/** + * An Array of month names starting with Janurary. + * + * @example monthNames[0] + * @result 'January' + * + * @name monthNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; + +/** + * An Array of abbreviated month names starting with Jan. + * + * @example abbrMonthNames[0] + * @result 'Jan' + * + * @name monthNames + * @type Array + * @cat Plugins/Methods/Date + */ +Date.abbrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; + +/** + * The first day of the week for this locale. + * + * @name firstDayOfWeek + * @type Number + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ +Date.firstDayOfWeek = 1; + +/** + * The format that string dates should be represented as (e.g. 'dd/mm/yyyy' for UK, 'mm/dd/yyyy' for US, 'yyyy-mm-dd' for Unicode etc). + * + * @name format + * @type String + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ +Date.format = 'dd/mm/yyyy'; +//Date.format = 'mm/dd/yyyy'; +//Date.format = 'yyyy-mm-dd'; +//Date.format = 'dd mmm yy'; + +/** + * The first two numbers in the century to be used when decoding a two digit year. Since a two digit year is ambiguous (and date.setYear + * only works with numbers < 99 and so doesn't allow you to set years after 2000) we need to use this to disambiguate the two digit year codes. + * + * @name format + * @type String + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ +Date.fullYearStart = '20'; + +(function() { + + /** + * Adds a given method under the given name + * to the Date prototype if it doesn't + * currently exist. + * + * @private + */ + function add(name, method) { + if( !Date.prototype[name] ) { + Date.prototype[name] = method; + } + }; + + /** + * Checks if the year is a leap year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.isLeapYear(); + * @result true + * + * @name isLeapYear + * @type Boolean + * @cat Plugins/Methods/Date + */ + add("isLeapYear", function() { + var y = this.getFullYear(); + return (y%4==0 && y%100!=0) || y%400==0; + }); + + /** + * Checks if the day is a weekend day (Sat or Sun). + * + * @example var dtm = new Date("01/12/2008"); + * dtm.isWeekend(); + * @result false + * + * @name isWeekend + * @type Boolean + * @cat Plugins/Methods/Date + */ + add("isWeekend", function() { + return this.getDay()==0 || this.getDay()==6; + }); + + /** + * Check if the day is a day of the week (Mon-Fri) + * + * @example var dtm = new Date("01/12/2008"); + * dtm.isWeekDay(); + * @result false + * + * @name isWeekDay + * @type Boolean + * @cat Plugins/Methods/Date + */ + add("isWeekDay", function() { + return !this.isWeekend(); + }); + + /** + * Gets the number of days in the month. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDaysInMonth(); + * @result 31 + * + * @name getDaysInMonth + * @type Number + * @cat Plugins/Methods/Date + */ + add("getDaysInMonth", function() { + return [31,(this.isLeapYear() ? 29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()]; + }); + + /** + * Gets the name of the day. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDayName(); + * @result 'Saturday' + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDayName(true); + * @result 'Sat' + * + * @param abbreviated Boolean When set to true the name will be abbreviated. + * @name getDayName + * @type String + * @cat Plugins/Methods/Date + */ + add("getDayName", function(abbreviated) { + return abbreviated ? Date.abbrDayNames[this.getDay()] : Date.dayNames[this.getDay()]; + }); + + /** + * Gets the name of the month. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getMonthName(); + * @result 'Janurary' + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getMonthName(true); + * @result 'Jan' + * + * @param abbreviated Boolean When set to true the name will be abbreviated. + * @name getDayName + * @type String + * @cat Plugins/Methods/Date + */ + add("getMonthName", function(abbreviated) { + return abbreviated ? Date.abbrMonthNames[this.getMonth()] : Date.monthNames[this.getMonth()]; + }); + + /** + * Get the number of the day of the year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getDayOfYear(); + * @result 11 + * + * @name getDayOfYear + * @type Number + * @cat Plugins/Methods/Date + */ + add("getDayOfYear", function() { + var tmpdtm = new Date("1/1/" + this.getFullYear()); + return Math.floor((this.getTime() - tmpdtm.getTime()) / 86400000); + }); + + /** + * Get the number of the week of the year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.getWeekOfYear(); + * @result 2 + * + * @name getWeekOfYear + * @type Number + * @cat Plugins/Methods/Date + */ + add("getWeekOfYear", function() { + return Math.ceil(this.getDayOfYear() / 7); + }); + + /** + * Set the day of the year. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.setDayOfYear(1); + * dtm.toString(); + * @result 'Tue Jan 01 2008 00:00:00' + * + * @name setDayOfYear + * @type Date + * @cat Plugins/Methods/Date + */ + add("setDayOfYear", function(day) { + this.setMonth(0); + this.setDate(day); + return this; + }); + + /** + * Add a number of years to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addYears(1); + * dtm.toString(); + * @result 'Mon Jan 12 2009 00:00:00' + * + * @name addYears + * @type Date + * @cat Plugins/Methods/Date + */ + add("addYears", function(num) { + this.setFullYear(this.getFullYear() + num); + return this; + }); + + /** + * Add a number of months to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addMonths(1); + * dtm.toString(); + * @result 'Tue Feb 12 2008 00:00:00' + * + * @name addMonths + * @type Date + * @cat Plugins/Methods/Date + */ + add("addMonths", function(num) { + var tmpdtm = this.getDate(); + + this.setMonth(this.getMonth() + num); + + if (tmpdtm > this.getDate()) + this.addDays(-this.getDate()); + + return this; + }); + + /** + * Add a number of days to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addDays(1); + * dtm.toString(); + * @result 'Sun Jan 13 2008 00:00:00' + * + * @name addDays + * @type Date + * @cat Plugins/Methods/Date + */ + add("addDays", function(num) { + //this.setDate(this.getDate() + num); + this.setTime(this.getTime() + (num*86400000) ); + return this; + }); + + /** + * Add a number of hours to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addHours(24); + * dtm.toString(); + * @result 'Sun Jan 13 2008 00:00:00' + * + * @name addHours + * @type Date + * @cat Plugins/Methods/Date + */ + add("addHours", function(num) { + this.setHours(this.getHours() + num); + return this; + }); + + /** + * Add a number of minutes to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addMinutes(60); + * dtm.toString(); + * @result 'Sat Jan 12 2008 01:00:00' + * + * @name addMinutes + * @type Date + * @cat Plugins/Methods/Date + */ + add("addMinutes", function(num) { + this.setMinutes(this.getMinutes() + num); + return this; + }); + + /** + * Add a number of seconds to the date object. + * + * @example var dtm = new Date("01/12/2008"); + * dtm.addSeconds(60); + * dtm.toString(); + * @result 'Sat Jan 12 2008 00:01:00' + * + * @name addSeconds + * @type Date + * @cat Plugins/Methods/Date + */ + add("addSeconds", function(num) { + this.setSeconds(this.getSeconds() + num); + return this; + }); + + /** + * Sets the time component of this Date to zero for cleaner, easier comparison of dates where time is not relevant. + * + * @example var dtm = new Date(); + * dtm.zeroTime(); + * dtm.toString(); + * @result 'Sat Jan 12 2008 00:01:00' + * + * @name zeroTime + * @type Date + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ + add("zeroTime", function() { + this.setMilliseconds(0); + this.setSeconds(0); + this.setMinutes(0); + this.setHours(0); + return this; + }); + + /** + * Returns a string representation of the date object according to Date.format. + * (Date.toString may be used in other places so I purposefully didn't overwrite it) + * + * @example var dtm = new Date("01/12/2008"); + * dtm.asString(); + * @result '12/01/2008' // (where Date.format == 'dd/mm/yyyy' + * + * @name asString + * @type Date + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ + add("asString", function(format) { + var r = format || Date.format; + if (r.split('mm').length>1) { // ugly workaround to make sure we don't replace the m's in e.g. noveMber + r = r.split('mmmm').join(this.getMonthName(false)) + .split('mmm').join(this.getMonthName(true)) + .split('mm').join(_zeroPad(this.getMonth()+1)) + } else { + r = r.split('m').join(this.getMonth()+1); + } + r = r.split('yyyy').join(this.getFullYear()) + .split('yy').join((this.getFullYear() + '').substring(2)) + .split('dd').join(_zeroPad(this.getDate())) + .split('d').join(this.getDate()); + return r; + }); + + /** + * Returns a new date object created from the passed String according to Date.format or false if the attempt to do this results in an invalid date object + * (We can't simple use Date.parse as it's not aware of locale and I chose not to overwrite it incase it's functionality is being relied on elsewhere) + * + * @example var dtm = Date.fromString("12/01/2008"); + * dtm.toString(); + * @result 'Sat Jan 12 2008 00:00:00' // (where Date.format == 'dd/mm/yyyy' + * + * @name fromString + * @type Date + * @cat Plugins/Methods/Date + * @author Kelvin Luck + */ + Date.fromString = function(s) + { + var f = Date.format; + + var d = new Date('01/01/1970'); + + if (s == '') return d; + + s = s.toLowerCase(); + var matcher = ''; + var order = []; + var r = /(dd?d?|mm?m?|yy?yy?)+([^(m|d|y)])?/g; + var results; + while ((results = r.exec(f)) != null) + { + switch (results[1]) { + case 'd': + case 'dd': + case 'm': + case 'mm': + case 'yy': + case 'yyyy': + matcher += '(\\d+\\d?\\d?\\d?)+'; + order.push(results[1].substr(0, 1)); + break; + case 'mmm': + matcher += '([a-z]{3})'; + order.push('M'); + break; + } + if (results[2]) { + matcher += results[2]; + } + + } + var dm = new RegExp(matcher); + var result = s.match(dm); + for (var i=0; i 1) firstDayOffset -= 7; + var weeksToDraw = Math.ceil(( (-1*firstDayOffset+1) + currentDate.getDaysInMonth() ) /7); + currentDate.addDays(firstDayOffset-1); + + var doHover = function(firstDayInBounds) + { + return function() + { + if (s.hoverClass) { + var $this = $(this); + if (!s.selectWeek) { + $this.addClass(s.hoverClass); + } else if (firstDayInBounds && !$this.is('.disabled')) { + $this.parent().addClass('activeWeekHover'); + } + } + } + }; + var unHover = function() + { + if (s.hoverClass) { + var $this = $(this); + $this.removeClass(s.hoverClass); + $this.parent().removeClass('activeWeekHover'); + } + }; + + var w = 0; + while (w++ s.dpController.startDate : false; + for (var i=0; i<7; i++) { + var thisMonth = currentDate.getMonth() == month; + var d = $(dc('td')) + .text(currentDate.getDate() + '') + .addClass((thisMonth ? 'current-month ' : 'other-month ') + + (currentDate.isWeekend() ? 'weekend ' : 'weekday ') + + (thisMonth && currentDate.getTime() == today.getTime() ? 'today ' : '') + ) + .data('datePickerDate', currentDate.asString()) + .hover(doHover(firstDayInBounds), unHover) + ; + r.append(d); + if (s.renderCallback) { + s.renderCallback(d, currentDate, month, year); + } + // addDays(1) fails in some locales due to daylight savings. See issue 39. + //currentDate.addDays(1); + // set the time to midday to avoid any weird timezone issues?? + currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate()+1, 12, 0, 0); + } + tbody.append(r); + } + calendarTable.append(tbody); + + return this.each( + function() + { + $(this).empty().append(calendarTable); + } + ); + }, +/** + * Create a datePicker associated with each of the matched elements. + * + * The matched element will receive a few custom events with the following signatures: + * + * dateSelected(event, date, $td, status) + * Triggered when a date is selected. event is a reference to the event, date is the Date selected, $td is a jquery object wrapped around the TD that was clicked on and status is whether the date was selected (true) or deselected (false) + * + * dpClosed(event, selected) + * Triggered when the date picker is closed. event is a reference to the event and selected is an Array containing Date objects. + * + * dpMonthChanged(event, displayedMonth, displayedYear) + * Triggered when the month of the popped up calendar is changed. event is a reference to the event, displayedMonth is the number of the month now displayed (zero based) and displayedYear is the year of the month. + * + * dpDisplayed(event, $datePickerDiv) + * Triggered when the date picker is created. $datePickerDiv is the div containing the date picker. Use this event to add custom content/ listeners to the popped up date picker. + * + * @param Object s (optional) Customize your date pickers. + * @option Number month The month to render when the date picker is opened (NOTE that months are zero based). Default is today's month. + * @option Number year The year to render when the date picker is opened. Default is today's year. + * @option String startDate The first date date can be selected. + * @option String endDate The last date that can be selected. + * @option Boolean inline Whether to create the datePicker as inline (e.g. always on the page) or as a model popup. Default is false (== modal popup) + * @option Boolean createButton Whether to create a .dp-choose-date anchor directly after the matched element which when clicked will trigger the showing of the date picker. Default is true. + * @option Boolean showYearNavigation Whether to display buttons which allow the user to navigate through the months a year at a time. Default is true. + * @option Boolean closeOnSelect Whether to close the date picker when a date is selected. Default is true. + * @option Boolean displayClose Whether to create a "Close" button within the date picker popup. Default is false. + * @option Boolean selectMultiple Whether a user should be able to select multiple dates with this date picker. Default is false. + * @option Number numSelectable The maximum number of dates that can be selected where selectMultiple is true. Default is a very high number. + * @option Boolean clickInput If the matched element is an input type="text" and this option is true then clicking on the input will cause the date picker to appear. + * @option Boolean rememberViewedMonth Whether the datePicker should remember the last viewed month and open on it. If false then the date picker will always open with the month for the first selected date visible. + * @option Boolean selectWeek Whether to select a complete week at a time... + * @option Number verticalPosition The vertical alignment of the popped up date picker to the matched element. One of $.dpConst.POS_TOP and $.dpConst.POS_BOTTOM. Default is $.dpConst.POS_TOP. + * @option Number horizontalPosition The horizontal alignment of the popped up date picker to the matched element. One of $.dpConst.POS_LEFT and $.dpConst.POS_RIGHT. + * @option Number verticalOffset The number of pixels offset from the defined verticalPosition of this date picker that it should pop up in. Default in 0. + * @option Number horizontalOffset The number of pixels offset from the defined horizontalPosition of this date picker that it should pop up in. Default in 0. + * @option (Function|Array) renderCallback A reference to a function (or an array of seperate functions) that is called as each cell is rendered and which can add classes and event listeners to the created nodes. Each callback function will receive four arguments; a jquery object wrapping the created TD, a Date object containing the date this TD represents, a number giving the currently rendered month and a number giving the currently rendered year. Default is no callback. + * @option String hoverClass The class to attach to each cell when you hover over it (to allow you to use hover effects in IE6 which doesn't support the :hover pseudo-class on elements other than links). Default is dp-hover. Pass false if you don't want a hover class. + * @type jQuery + * @name datePicker + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('input.date-picker').datePicker(); + * @desc Creates a date picker button next to all matched input elements. When the button is clicked on the value of the selected date will be placed in the corresponding input (formatted according to Date.format). + * + * @example demo/index.html + * @desc See the projects homepage for many more complex examples... + **/ + datePicker : function(s) + { + if (!$.event._dpCache) $.event._dpCache = []; + + // initialise the date picker controller with the relevant settings... + s = $.extend({}, $.fn.datePicker.defaults, s); + + return this.each( + function() + { + var $this = $(this); + var alreadyExists = true; + + if (!this._dpId) { + this._dpId = $.event.guid++; + $.event._dpCache[this._dpId] = new DatePicker(this); + alreadyExists = false; + } + + if (s.inline) { + s.createButton = false; + s.displayClose = false; + s.closeOnSelect = false; + $this.empty(); + } + + var controller = $.event._dpCache[this._dpId]; + + controller.init(s); + + if (!alreadyExists && s.createButton) { + // create it! + controller.button = $('' + $.dpText.TEXT_CHOOSE_DATE + '') + .bind( + 'click', + function() + { + $this.dpDisplay(this); + this.blur(); + return false; + } + ); + $this.after(controller.button); + } + + if (!alreadyExists && $this.is(':text')) { + $this + .bind( + 'dateSelected', + function(e, selectedDate, $td) + { + this.value = selectedDate.asString(); + } + ).bind( + 'change', + function() + { + if (this.value == '') { + controller.clearSelected(); + } else { + var d = Date.fromString(this.value); + if (d) { + controller.setSelected(d, true, true); + } + } + } + ); + if (s.clickInput) { + $this.bind( + 'click', + function() + { + // The change event doesn't happen until the input loses focus so we need to manually trigger it... + $this.trigger('change'); + $this.dpDisplay(); + } + ); + } + var d = Date.fromString(this.value); + if (this.value != '' && d) { + controller.setSelected(d, true, true); + } + } + + $this.addClass('dp-applied'); + + } + ) + }, +/** + * Disables or enables this date picker + * + * @param Boolean s Whether to disable (true) or enable (false) this datePicker + * @type jQuery + * @name dpSetDisabled + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetDisabled(true); + * @desc Prevents this date picker from displaying and adds a class of dp-disabled to it (and it's associated button if it has one) for styling purposes. If the matched element is an input field then it will also set the disabled attribute to stop people directly editing the field. + **/ + dpSetDisabled : function(s) + { + return _w.call(this, 'setDisabled', s); + }, +/** + * Updates the first selectable date for any date pickers on any matched elements. + * + * @param String d A string representing the first selectable date (formatted according to Date.format). + * @type jQuery + * @name dpSetStartDate + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetStartDate('01/01/2000'); + * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the first selectable date for each of these to the first day of the millenium. + **/ + dpSetStartDate : function(d) + { + return _w.call(this, 'setStartDate', d); + }, +/** + * Updates the last selectable date for any date pickers on any matched elements. + * + * @param String d A string representing the last selectable date (formatted according to Date.format). + * @type jQuery + * @name dpSetEndDate + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetEndDate('01/01/2010'); + * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the last selectable date for each of these to the first Janurary 2010. + **/ + dpSetEndDate : function(d) + { + return _w.call(this, 'setEndDate', d); + }, +/** + * Gets a list of Dates currently selected by this datePicker. This will be an empty array if no dates are currently selected or NULL if there is no datePicker associated with the matched element. + * + * @type Array + * @name dpGetSelected + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * alert($('.date-picker').dpGetSelected()); + * @desc Will alert an empty array (as nothing is selected yet) + **/ + dpGetSelected : function() + { + var c = _getController(this[0]); + if (c) { + return c.getSelected(); + } + return null; + }, +/** + * Selects or deselects a date on any matched element's date pickers. Deselcting is only useful on date pickers where selectMultiple==true. Selecting will only work if the passed date is within the startDate and endDate boundries for a given date picker. + * + * @param String d A string representing the date you want to select (formatted according to Date.format). + * @param Boolean v Whether you want to select (true) or deselect (false) this date. Optional - default = true. + * @param Boolean m Whether you want the date picker to open up on the month of this date when it is next opened. Optional - default = true. + * @param Boolean e Whether you want the date picker to dispatch events related to this change of selection. Optional - default = true. + * @type jQuery + * @name dpSetSelected + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetSelected('01/01/2010'); + * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the selected date on these date pickers to the first Janurary 2010. When the date picker is next opened it will display Janurary 2010. + **/ + dpSetSelected : function(d, v, m, e) + { + if (v == undefined) v=true; + if (m == undefined) m=true; + if (e == undefined) e=true; + return _w.call(this, 'setSelected', Date.fromString(d), v, m, e); + }, +/** + * Sets the month that will be displayed when the date picker is next opened. If the passed month is before startDate then the month containing startDate will be displayed instead. If the passed month is after endDate then the month containing the endDate will be displayed instead. + * + * @param Number m The month you want the date picker to display. Optional - defaults to the currently displayed month. + * @param Number y The year you want the date picker to display. Optional - defaults to the currently displayed year. + * @type jQuery + * @name dpSetDisplayedMonth + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-picker').datePicker(); + * $('.date-picker').dpSetDisplayedMonth(10, 2008); + * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the selected date on these date pickers to the first Janurary 2010. When the date picker is next opened it will display Janurary 2010. + **/ + dpSetDisplayedMonth : function(m, y) + { + return _w.call(this, 'setDisplayedMonth', Number(m), Number(y), true); + }, +/** + * Displays the date picker associated with the matched elements. Since only one date picker can be displayed at once then the date picker associated with the last matched element will be the one that is displayed. + * + * @param HTMLElement e An element that you want the date picker to pop up relative in position to. Optional - default behaviour is to pop up next to the element associated with this date picker. + * @type jQuery + * @name dpDisplay + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('#date-picker').datePicker(); + * $('#date-picker').dpDisplay(); + * @desc Creates a date picker associated with the element with an id of date-picker and then causes it to pop up. + **/ + dpDisplay : function(e) + { + return _w.call(this, 'display', e); + }, +/** + * Sets a function or array of functions that is called when each TD of the date picker popup is rendered to the page + * + * @param (Function|Array) a A function or an array of functions that are called when each td is rendered. Each function will receive four arguments; a jquery object wrapping the created TD, a Date object containing the date this TD represents, a number giving the currently rendered month and a number giving the currently rendered year. + * @type jQuery + * @name dpSetRenderCallback + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('#date-picker').datePicker(); + * $('#date-picker').dpSetRenderCallback(function($td, thisDate, month, year) + * { + * // do stuff as each td is rendered dependant on the date in the td and the displayed month and year + * }); + * @desc Creates a date picker associated with the element with an id of date-picker and then creates a function which is called as each td is rendered when this date picker is displayed. + **/ + dpSetRenderCallback : function(a) + { + return _w.call(this, 'setRenderCallback', a); + }, +/** + * Sets the position that the datePicker will pop up (relative to it's associated element) + * + * @param Number v The vertical alignment of the created date picker to it's associated element. Possible values are $.dpConst.POS_TOP and $.dpConst.POS_BOTTOM + * @param Number h The horizontal alignment of the created date picker to it's associated element. Possible values are $.dpConst.POS_LEFT and $.dpConst.POS_RIGHT + * @type jQuery + * @name dpSetPosition + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('#date-picker').datePicker(); + * $('#date-picker').dpSetPosition($.dpConst.POS_BOTTOM, $.dpConst.POS_RIGHT); + * @desc Creates a date picker associated with the element with an id of date-picker and makes it so that when this date picker pops up it will be bottom and right aligned to the #date-picker element. + **/ + dpSetPosition : function(v, h) + { + return _w.call(this, 'setPosition', v, h); + }, +/** + * Sets the offset that the popped up date picker will have from it's default position relative to it's associated element (as set by dpSetPosition) + * + * @param Number v The vertical offset of the created date picker. + * @param Number h The horizontal offset of the created date picker. + * @type jQuery + * @name dpSetOffset + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('#date-picker').datePicker(); + * $('#date-picker').dpSetOffset(-20, 200); + * @desc Creates a date picker associated with the element with an id of date-picker and makes it so that when this date picker pops up it will be 20 pixels above and 200 pixels to the right of it's default position. + **/ + dpSetOffset : function(v, h) + { + return _w.call(this, 'setOffset', v, h); + }, +/** + * Closes the open date picker associated with this element. + * + * @type jQuery + * @name dpClose + * @cat plugins/datePicker + * @author Kelvin Luck (http://www.kelvinluck.com/) + * + * @example $('.date-pick') + * .datePicker() + * .bind( + * 'focus', + * function() + * { + * $(this).dpDisplay(); + * } + * ).bind( + * 'blur', + * function() + * { + * $(this).dpClose(); + * } + * ); + * @desc Creates a date picker and makes it appear when the relevant element is focused and disappear when it is blurred. + **/ + dpClose : function() + { + return _w.call(this, '_closeCalendar', false, this[0]); + }, + // private function called on unload to clean up any expandos etc and prevent memory links... + _dpDestroy : function() + { + // TODO - implement this? + } + }); + + // private internal function to cut down on the amount of code needed where we forward + // dp* methods on the jQuery object on to the relevant DatePicker controllers... + var _w = function(f, a1, a2, a3, a4) + { + return this.each( + function() + { + var c = _getController(this); + if (c) { + c[f](a1, a2, a3, a4); + } + } + ); + }; + + function DatePicker(ele) + { + this.ele = ele; + + // initial values... + this.displayedMonth = null; + this.displayedYear = null; + this.startDate = null; + this.endDate = null; + this.showYearNavigation = null; + this.closeOnSelect = null; + this.displayClose = null; + this.rememberViewedMonth= null; + this.selectMultiple = null; + this.numSelectable = null; + this.numSelected = null; + this.verticalPosition = null; + this.horizontalPosition = null; + this.verticalOffset = null; + this.horizontalOffset = null; + this.button = null; + this.renderCallback = []; + this.selectedDates = {}; + this.inline = null; + this.context = '#dp-popup'; + this.settings = {}; + }; + $.extend( + DatePicker.prototype, + { + init : function(s) + { + this.setStartDate(s.startDate); + this.setEndDate(s.endDate); + this.setDisplayedMonth(Number(s.month), Number(s.year)); + this.setRenderCallback(s.renderCallback); + this.showYearNavigation = s.showYearNavigation; + this.closeOnSelect = s.closeOnSelect; + this.displayClose = s.displayClose; + this.rememberViewedMonth = s.rememberViewedMonth; + this.selectMultiple = s.selectMultiple; + this.numSelectable = s.selectMultiple ? s.numSelectable : 1; + this.numSelected = 0; + this.verticalPosition = s.verticalPosition; + this.horizontalPosition = s.horizontalPosition; + this.hoverClass = s.hoverClass; + this.setOffset(s.verticalOffset, s.horizontalOffset); + this.inline = s.inline; + this.settings = s; + if (this.inline) { + this.context = this.ele; + this.display(); + } + }, + setStartDate : function(d) + { + if (d) { + this.startDate = Date.fromString(d); + } + if (!this.startDate) { + this.startDate = (new Date()).zeroTime(); + } + this.setDisplayedMonth(this.displayedMonth, this.displayedYear); + }, + setEndDate : function(d) + { + if (d) { + this.endDate = Date.fromString(d); + } + if (!this.endDate) { + this.endDate = (new Date('12/31/2999')); // using the JS Date.parse function which expects mm/dd/yyyy + } + if (this.endDate.getTime() < this.startDate.getTime()) { + this.endDate = this.startDate; + } + this.setDisplayedMonth(this.displayedMonth, this.displayedYear); + }, + setPosition : function(v, h) + { + this.verticalPosition = v; + this.horizontalPosition = h; + }, + setOffset : function(v, h) + { + this.verticalOffset = parseInt(v) || 0; + this.horizontalOffset = parseInt(h) || 0; + }, + setDisabled : function(s) + { + $e = $(this.ele); + $e[s ? 'addClass' : 'removeClass']('dp-disabled'); + if (this.button) { + $but = $(this.button); + $but[s ? 'addClass' : 'removeClass']('dp-disabled'); + $but.attr('title', s ? '' : $.dpText.TEXT_CHOOSE_DATE); + } + if ($e.is(':text')) { + $e.attr('disabled', s ? 'disabled' : ''); + } + }, + setDisplayedMonth : function(m, y, rerender) + { + if (this.startDate == undefined || this.endDate == undefined) { + return; + } + var s = new Date(this.startDate.getTime()); + s.setDate(1); + var e = new Date(this.endDate.getTime()); + e.setDate(1); + + var t; + if ((!m && !y) || (isNaN(m) && isNaN(y))) { + // no month or year passed - default to current month + t = new Date().zeroTime(); + t.setDate(1); + } else if (isNaN(m)) { + // just year passed in - presume we want the displayedMonth + t = new Date(y, this.displayedMonth, 1); + } else if (isNaN(y)) { + // just month passed in - presume we want the displayedYear + t = new Date(this.displayedYear, m, 1); + } else { + // year and month passed in - that's the date we want! + t = new Date(y, m, 1) + } + // check if the desired date is within the range of our defined startDate and endDate + if (t.getTime() < s.getTime()) { + t = s; + } else if (t.getTime() > e.getTime()) { + t = e; + } + var oldMonth = this.displayedMonth; + var oldYear = this.displayedYear; + this.displayedMonth = t.getMonth(); + this.displayedYear = t.getFullYear(); + + if (rerender && (this.displayedMonth != oldMonth || this.displayedYear != oldYear)) + { + this._rerenderCalendar(); + $(this.ele).trigger('dpMonthChanged', [this.displayedMonth, this.displayedYear]); + } + }, + setSelected : function(d, v, moveToMonth, dispatchEvents) + { + if (d < this.startDate || d > this.endDate) { + // Don't allow people to select dates outside range... + return; + } + var s = this.settings; + if (s.selectWeek) + { + d = d.addDays(- (d.getDay() - Date.firstDayOfWeek + 7) % 7); + if (d < this.startDate) // The first day of this week is before the start date so is unselectable... + { + return; + } + } + if (v == this.isSelected(d)) // this date is already un/selected + { + return; + } + if (this.selectMultiple == false) { + this.clearSelected(); + } else if (v && this.numSelected == this.numSelectable) { + // can't select any more dates... + return; + } + if (moveToMonth && (this.displayedMonth != d.getMonth() || this.displayedYear != d.getFullYear())) { + this.setDisplayedMonth(d.getMonth(), d.getFullYear(), true); + } + this.selectedDates[d.asString()] = v; + this.numSelected += v ? 1 : -1; + var selectorString = 'td.' + (d.getMonth() == this.displayedMonth ? 'current-month' : 'other-month'); + var $td; + $(selectorString, this.context).each( + function() + { + if ($(this).data('datePickerDate') == d.asString()) { + $td = $(this); + if (s.selectWeek) + { + $td.parent()[v ? 'addClass' : 'removeClass']('selectedWeek'); + } + $td[v ? 'addClass' : 'removeClass']('selected'); + } + } + ); + $('td', this.context).not('.selected')[this.selectMultiple && this.numSelected == this.numSelectable ? 'addClass' : 'removeClass']('unselectable'); + + if (dispatchEvents) + { + var s = this.isSelected(d); + $e = $(this.ele); + var dClone = Date.fromString(d.asString()); + $e.trigger('dateSelected', [dClone, $td, s]); + $e.trigger('change'); + } + }, + isSelected : function(d) + { + return this.selectedDates[d.asString()]; + }, + getSelected : function() + { + var r = []; + for(s in this.selectedDates) { + if (this.selectedDates[s] == true) { + r.push(Date.fromString(s)); + } + } + return r; + }, + clearSelected : function() + { + this.selectedDates = {}; + this.numSelected = 0; + $('td.selected', this.context).removeClass('selected').parent().removeClass('selectedWeek'); + }, + display : function(eleAlignTo) + { + if ($(this.ele).is('.dp-disabled')) return; + + eleAlignTo = eleAlignTo || this.ele; + var c = this; + var $ele = $(eleAlignTo); + var eleOffset = $ele.offset(); + + var $createIn; + var attrs; + var attrsCalendarHolder; + var cssRules; + + if (c.inline) { + $createIn = $(this.ele); + attrs = { + 'id' : 'calendar-' + this.ele._dpId, + 'class' : 'dp-popup dp-popup-inline' + }; + + $('.dp-popup', $createIn).remove(); + cssRules = { + }; + } else { + $createIn = $('body'); + attrs = { + 'id' : 'dp-popup', + 'class' : 'dp-popup' + }; + cssRules = { + 'top' : eleOffset.top + c.verticalOffset, + 'left' : eleOffset.left + c.horizontalOffset + }; + + var _checkMouse = function(e) + { + var el = e.target; + var cal = $('#dp-popup')[0]; + + while (true){ + if (el == cal) { + return true; + } else if (el == document) { + c._closeCalendar(); + return false; + } else { + el = $(el).parent()[0]; + } + } + }; + this._checkMouse = _checkMouse; + + c._closeCalendar(true); + $(document).bind( + 'keydown.datepicker', + function(event) + { + if (event.keyCode == 27) { + c._closeCalendar(); + } + } + ); + } + + if (!c.rememberViewedMonth) + { + var selectedDate = this.getSelected()[0]; + if (selectedDate) { + selectedDate = new Date(selectedDate); + this.setDisplayedMonth(selectedDate.getMonth(), selectedDate.getFullYear(), false); + } + } + + $createIn + .append( + $('
') + .attr(attrs) + .css(cssRules) + .append( +// $('aaa'), + $('

'), + $('
') + .append( + $('<<') + .bind( + 'click', + function() + { + return c._displayNewMonth.call(c, this, 0, -1); + } + ), + $('<') + .bind( + 'click', + function() + { + return c._displayNewMonth.call(c, this, -1, 0); + } + ) + ), + $('
') + .append( + $('>>') + .bind( + 'click', + function() + { + return c._displayNewMonth.call(c, this, 0, 1); + } + ), + $('>') + .bind( + 'click', + function() + { + return c._displayNewMonth.call(c, this, 1, 0); + } + ) + ), + $('
') + ) + .bgIframe() + ); + + var $pop = this.inline ? $('.dp-popup', this.context) : $('#dp-popup'); + + if (this.showYearNavigation == false) { + $('.dp-nav-prev-year, .dp-nav-next-year', c.context).css('display', 'none'); + } + if (this.displayClose) { + $pop.append( + $('' + $.dpText.TEXT_CLOSE + '') + .bind( + 'click', + function() + { + c._closeCalendar(); + return false; + } + ) + ); + } + c._renderCalendar(); + + $(this.ele).trigger('dpDisplayed', $pop); + + if (!c.inline) { + if (this.verticalPosition == $.dpConst.POS_BOTTOM) { + $pop.css('top', eleOffset.top + $ele.height() - $pop.height() + c.verticalOffset); + } + if (this.horizontalPosition == $.dpConst.POS_RIGHT) { + $pop.css('left', eleOffset.left + $ele.width() - $pop.width() + c.horizontalOffset); + } +// $('.selectee', this.context).focus(); + $(document).bind('mousedown.datepicker', this._checkMouse); + } + + }, + setRenderCallback : function(a) + { + if (a == null) return; + if (a && typeof(a) == 'function') { + a = [a]; + } + this.renderCallback = this.renderCallback.concat(a); + }, + cellRender : function ($td, thisDate, month, year) { + var c = this.dpController; + var d = new Date(thisDate.getTime()); + + // add our click handlers to deal with it when the days are clicked... + + $td.bind( + 'click', + function() + { + var $this = $(this); + if (!$this.is('.disabled')) { + c.setSelected(d, !$this.is('.selected') || !c.selectMultiple, false, true); + if (c.closeOnSelect) { + c._closeCalendar(); + } + // TODO: Instead of this which doesn't work in IE anyway we should find the next focusable element in the document + // and pass the focus onto that. That would allow the user to continue on the form as expected... + if (!$.browser.msie) + { + $(c.ele).trigger('focus', [$.dpConst.DP_INTERNAL_FOCUS]); + } + } + } + ); + if (c.isSelected(d)) { + $td.addClass('selected'); + if (c.settings.selectWeek) + { + $td.parent().addClass('selectedWeek'); + } + } else if (c.selectMultiple && c.numSelected == c.numSelectable) { + $td.addClass('unselectable'); + } + + }, + _applyRenderCallbacks : function() + { + var c = this; + $('td', this.context).each( + function() + { + for (var i=0; i 20) { + $this.addClass('disabled'); + } + } + ); + var d = this.startDate.getDate(); + $('.dp-calendar td.current-month', this.context).each( + function() + { + var $this = $(this); + if (Number($this.text()) < d) { + $this.addClass('disabled'); + } + } + ); + } else { + $('.dp-nav-prev-year', this.context).removeClass('disabled'); + $('.dp-nav-prev-month', this.context).removeClass('disabled'); + var d = this.startDate.getDate(); + if (d > 20) { + // check if the startDate is last month as we might need to add some disabled classes... + var st = this.startDate.getTime(); + var sd = new Date(st); + sd.addMonths(1); + if (this.displayedYear == sd.getFullYear() && this.displayedMonth == sd.getMonth()) { + $('.dp-calendar td.other-month', this.context).each( + function() + { + var $this = $(this); + if (Date.fromString($this.data('datePickerDate')).getTime() < st) { + $this.addClass('disabled'); + } + } + ); + } + } + } + if (this.displayedYear == this.endDate.getFullYear() && this.displayedMonth == this.endDate.getMonth()) { + $('.dp-nav-next-year', this.context).addClass('disabled'); + $('.dp-nav-next-month', this.context).addClass('disabled'); + $('.dp-calendar td.other-month', this.context).each( + function() + { + var $this = $(this); + if (Number($this.text()) < 14) { + $this.addClass('disabled'); + } + } + ); + var d = this.endDate.getDate(); + $('.dp-calendar td.current-month', this.context).each( + function() + { + var $this = $(this); + if (Number($this.text()) > d) { + $this.addClass('disabled'); + } + } + ); + } else { + $('.dp-nav-next-year', this.context).removeClass('disabled'); + $('.dp-nav-next-month', this.context).removeClass('disabled'); + var d = this.endDate.getDate(); + if (d < 13) { + // check if the endDate is next month as we might need to add some disabled classes... + var ed = new Date(this.endDate.getTime()); + ed.addMonths(-1); + if (this.displayedYear == ed.getFullYear() && this.displayedMonth == ed.getMonth()) { + $('.dp-calendar td.other-month', this.context).each( + function() + { + var $this = $(this); + var cellDay = Number($this.text()); + if (cellDay < 13 && cellDay > d) { + $this.addClass('disabled'); + } + } + ); + } + } + } + this._applyRenderCallbacks(); + }, + _closeCalendar : function(programatic, ele) + { + if (!ele || ele == this.ele) + { + $(document).unbind('mousedown.datepicker'); + $(document).unbind('keydown.datepicker'); + this._clearCalendar(); + $('#dp-popup a').unbind(); + $('#dp-popup').empty().remove(); + if (!programatic) { + $(this.ele).trigger('dpClosed', [this.getSelected()]); + } + } + }, + // empties the current dp-calendar div and makes sure that all events are unbound + // and expandos removed to avoid memory leaks... + _clearCalendar : function() + { + // TODO. + $('.dp-calendar td', this.context).unbind(); + $('.dp-calendar', this.context).empty(); + } + } + ); + + // static constants + $.dpConst = { + SHOW_HEADER_NONE : 0, + SHOW_HEADER_SHORT : 1, + SHOW_HEADER_LONG : 2, + POS_TOP : 0, + POS_BOTTOM : 1, + POS_LEFT : 0, + POS_RIGHT : 1, + DP_INTERNAL_FOCUS : 'dpInternalFocusTrigger' + }; + // localisable text + $.dpText = { + TEXT_PREV_YEAR : 'Previous year', + TEXT_PREV_MONTH : 'Previous month', + TEXT_NEXT_YEAR : 'Next year', + TEXT_NEXT_MONTH : 'Next month', + TEXT_CLOSE : 'Close', + TEXT_CHOOSE_DATE : 'Choose date', + HEADER_FORMAT : 'mmmm yyyy' + }; + // version + $.dpVersion = '$Id: jquery.datePicker.js 84 2009-08-05 17:54:35Z kelvin.luck@gmail.com $'; + + $.fn.datePicker.defaults = { + month : undefined, + year : undefined, + showHeader : $.dpConst.SHOW_HEADER_SHORT, + startDate : undefined, + endDate : undefined, + inline : false, + renderCallback : null, + createButton : true, + showYearNavigation : true, + closeOnSelect : true, + displayClose : false, + selectMultiple : false, + numSelectable : Number.MAX_VALUE, + clickInput : false, + rememberViewedMonth : true, + selectWeek : false, + verticalPosition : $.dpConst.POS_TOP, + horizontalPosition : $.dpConst.POS_LEFT, + verticalOffset : 0, + horizontalOffset : 0, + hoverClass : 'dp-hover' + }; + + function _getController(ele) + { + if (ele._dpId) return $.event._dpCache[ele._dpId]; + return false; + }; + + // make it so that no error is thrown if bgIframe plugin isn't included (allows you to use conditional + // comments to only include bgIframe where it is needed in IE without breaking this plugin). + if ($.fn.bgIframe == undefined) { + $.fn.bgIframe = function() {return this; }; + }; + + + // clean-up + $(window) + .bind('unload', function() { + var els = $.event._dpCache || []; + for (var i in els) { + $(els[i].ele)._dpDestroy(); + } + }); + + +})(jQuery); diff --git a/static/search/browser.html b/static/search/browser.html index 99e4710..917294f 100755 --- a/static/search/browser.html +++ b/static/search/browser.html @@ -4,6 +4,8 @@ dump.fm - image search @@ -101,19 +92,17 @@ top:15px;
- - -

- -
- + browser tool + + +
+ -
+ -

- -
+ +
diff --git a/static/search/browser.png b/static/search/browser.png index a2e22c0..1ae3413 100644 Binary files a/static/search/browser.png and b/static/search/browser.png differ diff --git a/static/talkwith.png b/static/talkwith.png new file mode 100644 index 0000000..7642fca Binary files /dev/null and b/static/talkwith.png differ -- cgit v1.2.3-70-g09d2 From c74bc3cc46bd2125ca640342907ee53a8c663f9e Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sat, 16 Jan 2010 23:04:19 -0500 Subject: timb merging ryder's changes --- static/header.css | 17 +++++--- static/pichat.css | 13 +++--- static/profile.css | 121 ++++++++++++++++++++++++++++------------------------ template/browser.st | 4 +- template/log.st | 33 ++++++-------- template/profile.st | 26 +++++------ 6 files changed, 116 insertions(+), 98 deletions(-) (limited to 'static') diff --git a/static/header.css b/static/header.css index 4b03c2c..e4a09a3 100755 --- a/static/header.css +++ b/static/header.css @@ -9,6 +9,10 @@ font-size:16px; color: #fff; } +#strapline{position:absolute; +top:1; +right:10%; +} .white a:hover { text-decoration: none; text-shadow: -1px 1px 1px #; @@ -42,13 +46,13 @@ filter: progid:DXImageTransform.Microsoft.dropShadow(color=#036aca, offX=3, offY } #bar7{ - top:28px; + top:30px; position:absolute; font-family: Arial, Helvetica, sans-serif; - font-size: 18px; + font-size: 16px; left: 170px; - margin-left: 2%; + margin-left: 1%; margin-right: 8%; letter-spacing: -1px; z-index: 999; @@ -63,6 +67,10 @@ filter: progid:DXImageTransform.Microsoft.dropShadow(color=#036aca, offX=3, offY font-family: Arial, Helvetica, sans-serif; font-weight: normal; } +#logout7 a{font-size:12px; +} +#logout7 a:hover{font-size:12px; +} #logo7{ top:20px; margin-left: 15px; @@ -251,9 +259,8 @@ border:0; .btnav { border: 0px #000000 solid;} body { - background-color:#e3e3e3; - background-position:center; + z-index:0; } diff --git a/static/pichat.css b/static/pichat.css index 40720b7..0e5fb5f 100755 --- a/static/pichat.css +++ b/static/pichat.css @@ -4,6 +4,10 @@ body { background-color:#e3e3e3; margin:0; + background-color:#ffffee; + background-image:url(/static/chanbg.png); + background-repeat:repeat-x; + background-position:top; } @@ -29,7 +33,7 @@ body { position:fixed; width:100%; bottom:0px; -line-height:2.5; +line-height:3.1; font-size:11px; word-spacing:8px; height:28px; @@ -55,15 +59,12 @@ color:000; #messagePane { border: 2px solid #c8cbce; - - top:56px; bottom:65px; position:fixed; width: 99%; background-color:#FFF; left:0.3%; - z-index:5; } @@ -164,7 +165,7 @@ top:15px; position: absolute; padding: 5px; top:85px; - min-width: 150px; + min-width: 160px; width:11%; float:right; right: 6%; @@ -184,6 +185,8 @@ top:15px; -webkit-border-bottom-right-radius:5px; -moz-border-radius-bottomleft:5px; -moz-border-radius-bottomright:5px; +border-right:2px solid #c8cbce; +border-bottom:2px solid #c8cbce; max-height:450px; box-shadow: 3px 4px 4px #c8cbce; -webkit-box-shadow: 3px 4px 4px #c8cbce; diff --git a/static/profile.css b/static/profile.css index 7605fc7..91e5b92 100755 --- a/static/profile.css +++ b/static/profile.css @@ -1,40 +1,26 @@ #profile { float: right; padding: 20px; - width: 180px; +width:180; position:absolute; - top:17px; - left:560; - margin-top:9px; - background-color:#f5f5f5; + top:30px; + left:642; + margin-top:34px; +background-color:#fff; background-image:url(/static/spexx.png); - border:solid 1px #999; + text-overflow: ellipsis-word; background-position:top; z-index:999; min-height:600px; - border-top-left-radius:5px; - border-top-right-radius:5px; - -webkit-border-top-left-radius:5px; - -webkit-border-top-right-radius:5px; - -moz-border-radius-topleft:5px; - -moz-border-radius-topright:5px; - border-bottom-left-radius:5px; - border-bottom-right-radius:5px; - -webkit-border-bottom-left-radius:5px; - -webkit-border-bottom-right-radius:5px; - -moz-border-radius-bottomleft:5px; - -moz-border-radius-bottomright:5px; - box-shadow: 10px 3px 10px #c8cbce; --webkit-box-shadow:10px 3px 10px #c8cbce; --moz-box-shadow:10px 3px 10px #c8cbce; + - line-height:1.6; + line-height:1.5; } #chatrap{ - width:600 ; + width:800; - margin-left: 18%; + margin-left:auto; margin-right: auto ; @@ -42,38 +28,44 @@ } #pnav{position:absolute; -background:#fff; -height:25px; + +height:45px; padding-left:11; font-size:20px; -margin-top:-28; -background-image:url(/static/bgnav.jpg); +margin-top:-40; background-position:top; font-weight:bold; -width:260; +width:600; +margin-left:35; text-align:left; -border:1px solid #087cff; -left:-70; + + letter-spacing:2px; - border-top-left-radius:5px; - border-top-right-radius:5px; - -webkit-border-top-left-radius:5px; - -webkit-border-top-right-radius:5px; - -moz-border-radius-topleft:5px; - -moz-border-radius-topright:5px; - border-bottom-left-radius:5px; - border-bottom-right-radius:5px; - -webkit-border-bottom-left-radius:5px; - -webkit-border-bottom-right-radius:5px; - -moz-border-radius-bottomleft:5px; - -moz-border-radius-bottomright:5px; - box-shadow: 15px 15px 10px #c8cbce; --webkit-box-shadow: 15px 15px 10px #c8cbce; --moz-box-shadow: 15px 15px 10px #c8cbce; + + +} +#pnavo{ +margin-top:20; +background:#fff; +width:240; + +height:35; + +} +#pnavn{ +position:absolute; +top:20; +left:280; +background:#fff; +width:270; +height:35; + + + } #pnav a { - font-size: 12px; - color:#444; + font-size: 30px; + color:#000; } pnav a:link { text-decoration: none; @@ -85,7 +77,8 @@ a:visited { } #pnav a:hover { text-decoration: none; - color: #f0e; + color: #fff; +background:#f0e; } a:active { text-decoration: none; @@ -108,10 +101,10 @@ height:28px; { position:absolute; - top:50px; + top:70px; margin-right:5px; padding-top: 25px; - min-height: 800px; + } @@ -135,14 +128,26 @@ height:28px; text-overflow: ellipsis-word; - padding: 15px; + padding: 18px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; text-transform: uppercase; line-height:15px; background-color:#fff; -border:1px solid #999; -margin-top:-2; +border:1px solid #eee; + border-top-left-radius:15px; + border-top-right-radius:15px; + -webkit-border-top-left-radius:15px; + -webkit-border-top-right-radius:15px; + -moz-border-radius-topleft:15px; + -moz-border-radius-topright:15px; + border-bottom-left-radius:15px; + border-bottom-right-radius:15px; + -webkit-border-bottom-left-radius:15px; + -webkit-border-bottom-right-radius:15px; + -moz-border-radius-bottomleft:15px; + -moz-border-radius-bottomright:15px; +margin-top:20; z-index:4; width:600; line-height:20px; @@ -240,6 +245,12 @@ padding:20; } body,td,th { font-family: Arial, Helvetica, sans-serif; + background-color:#ffffee; + background-image:url(/static/chanbg.png); + background-repeat:repeat-x; + background-position:top; + + -}@charset "UTF-8"; +}@charset "UTF-8"; \ No newline at end of file diff --git a/template/browser.st b/template/browser.st index 93da34d..33c6ba1 100755 --- a/template/browser.st +++ b/template/browser.st @@ -42,14 +42,14 @@
- +
$if(user_nick)$
-
$endif$ diff --git a/template/log.st b/template/log.st index 60eb3d5..abc0477 100755 --- a/template/log.st +++ b/template/log.st @@ -20,16 +20,7 @@

-
- $if(next)$ - <- OLD DUMPS - $endif$ -    - $if(prev)$ - NEW DUMPS -> - $endif$ -
$if(dumps)$ @@ -37,16 +28,20 @@ $else$ No dumps! $endif$ -
- - $if(next)$ - <- OLD DUMPS - $endif$ -    - $if(prev)$ - NEW DUMPS -> - $endif$ -
+
+
+ $if(next)$ + <- OLD DUMPS + $endif$ +
+
+    + $if(prev)$ + NEW DUMPS -> + $endif$ + +

+
diff --git a/template/profile.st b/template/profile.st index 91ca683..6204e27 100755 --- a/template/profile.st +++ b/template/profile.st @@ -3,11 +3,17 @@ $nick$'s dump.fm $head()$ + + + + + + + $banner()$ @@ -19,15 +25,7 @@

-
- $if(next)$ - <- OLD DUMPS - $endif$ -    - $if(prev)$ - NEW DUMPS -> - $endif$ -
+
@@ -49,16 +47,19 @@ $endif$

 

+
$if(next)$ <- OLD DUMPS $endif$ +
+
   $if(prev)$ NEW DUMPS -> $endif$

-
+
@@ -82,7 +83,8 @@

personal info

$bio$
-
+


+ - $if(user_nick)$
-
Logout +
$if(user_nick)$ Logout $else$ $form_login()$ $endif$
- $else$ $form_login()$ $endif$

diff --git a/template/form_login.st b/template/form_login.st index 5c164fe..aee9283 100644 --- a/template/form_login.st +++ b/template/form_login.st @@ -1,7 +1,13 @@
- +
Have an account?
+

+ +

+


+

+

-- cgit v1.2.3-70-g09d2 From 860fff28431e405174eb11a41dbb044674b80a9a Mon Sep 17 00:00:00 2001 From: timb Date: Tue, 19 Jan 2010 12:51:06 -0800 Subject: imageify multiple image urls in a line --- static/js/pichat.js | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'static') diff --git a/static/js/pichat.js b/static/js/pichat.js index 559e775..69a347c 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -3,29 +3,23 @@ function escapeHtml(txt) { else { return $("").text(txt).html(); } } -// http://stackoverflow.com/questions/37684/replace-url-with-html-links-javascript function linkify(text) { - var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi; - return text.replace(exp,"$1"); + var URLRegex = /((\b(http\:\/\/|https\:\/\/|ftp\:\/\/)|(www\.))+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi; + return text.replace(URLRegex, linkReplace); } - -// http://snippets.dzone.com/posts/show/6995 -var URLRegex = /^((http\:\/\/|https\:\/\/|ftp\:\/\/)|(www\.))+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/i -var PicRegex = /\.(jpg|jpeg|png|gif|bmp)$/i; -function isImage(content) { - var match = URLRegex.exec(content); - sansParams = match && match[0].replace(/\?.*$/i, ""); - return sansParams && PicRegex.test(sansParams); +function linkReplace(match){ + var PicRegex = /\.(jpg|jpeg|png|gif|bmp)$/i; + var matchWithoutParams = match.replace(/\?.*$/i, "") + if (PicRegex.test(matchWithoutParams)){ + return "" + } else { + return "" + match + "" + } } function buildMsgContent(content) { - if (isImage(content)) { - return '' - + ''; - } else { - return linkify(escapeHtml(content)); - } + return linkify(content) } function buildMessageDiv(msg) { -- cgit v1.2.3-70-g09d2 From de9901b5caff3d97fab9dd30318b5a823dc30f5a Mon Sep 17 00:00:00 2001 From: timb Date: Tue, 19 Jan 2010 14:45:23 -0800 Subject: fix for blinking userlist --- static/js/pichat.js | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'static') diff --git a/static/js/pichat.js b/static/js/pichat.js index 69a347c..b9e0d46 100755 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -1,3 +1,5 @@ +var cache = {} + function escapeHtml(txt) { if (!txt) { return ""; } else { return $("").text(txt).html(); } @@ -28,13 +30,6 @@ function buildMessageDiv(msg) { + buildMsgContent(msg.content) + '

'; } -function buildGrowlDataAndPopDatShit(msg) { - var nick = escapeHtml(msg.nick); - nick = '' + nick + ':' - var msg = buildMsgContent(msg.content) - growl(nick, msg) -} - function buildUserDiv(user) { if (user.avatar) { return '
' + @@ -46,6 +41,20 @@ function buildUserDiv(user) { } } +function buildGrowlDataAndPopDatShit(msg) { + var nick = escapeHtml(msg.nick); + nick = '' + nick + ':' + var msg = buildMsgContent(msg.content) + growl(nick, msg) +} + +function growl(user, msg) { + $.gritter.add({ + title: user, + text: msg + }); +} + function handleMsgError(resp) { var respText = resp.responseText ? resp.responseText.trim() : false; if (respText == 'MUST_LOGIN') { @@ -117,7 +126,11 @@ function updateUI(msgs, users) { } } if (users !== null) { + var flattened = users.sort().join(",") + if (!('userlist' in cache) || flattened != cache.userlist){ $("#userList").html($.map(users, buildUserDiv).join('')); + } + cache.userlist = flattened } } @@ -227,12 +240,3 @@ function initLog() { }); } - -function growl(user, msg) { - $.gritter.add({ - // (string | mandatory) the heading of the notification - title: user, - // (string | mandatory) the text inside the notification - text: msg - }); -} -- cgit v1.2.3-70-g09d2 From 9b9f1b51d63ee0a46d766d285ffac028d7c40cbb Mon Sep 17 00:00:00 2001 From: timb Date: Tue, 19 Jan 2010 20:08:31 -0800 Subject: whoops, broke registration :( --- static/js/register.js | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ static/register.html | 4 ++-- static/register.js | 62 --------------------------------------------------- 3 files changed, 64 insertions(+), 64 deletions(-) create mode 100755 static/js/register.js delete mode 100755 static/register.js (limited to 'static') diff --git a/static/js/register.js b/static/js/register.js new file mode 100755 index 0000000..89a37fa --- /dev/null +++ b/static/js/register.js @@ -0,0 +1,62 @@ +function validateNick(n) { + if (n.length <= 2) { + return "BAD_NICK_LENGTH"; + } +} + +function submitRegistration() { + var nick = $('#nickInput').val(); + var email = $('#emailInput').val(); + var password = $('#passwordInput').val() || ""; + var hash = hex_sha1(nick + '$' + password + '$dumpfm'); + + if (nick.length < 3) { + alert("Nicks must be at least 3 characters long."); + return; + } else if (password.length < 5) { + alert("Password must be at least 5 characters long."); + return; + } + + var onSuccess = function() { + location.href = "/"; + }; + + var onError = function(resp) { + var respText = resp.responseText ? resp.responseText.trim() : false; + if (respText == 'NICK_TAKEN') { + alert("That nick is already taken! Please choose another."); + } else if (respText == 'NICK_INVALID_CHARS') { + alert("Nicks can only contain letters and numbers."); + } else { + alert("Unable to register!"); + } + }; + + $.ajax({ + type: 'GET', + timeout: 5000, + url: 'submit-registration', + data: {'nick': nick, 'email': email, 'hash': hash }, + cache: false, + dataType: 'json', + success: onSuccess, + error: onError + + }); +} + +function initRegister() { + $('#submit').click(submitRegistration); +} + +function handleMsgError(resp) { + var respText = resp.responseText ? resp.responseText.trim() : false; + if (respText == 'UNKNOWN_USER') { + alert("Can't send message! Please login."); + } else if (respText) { + alert("Cannot send message! (" + respText + ")"); + } else { + alert("Cannot send message!"); + } +} \ No newline at end of file diff --git a/static/register.html b/static/register.html index e2ead5f..3cddffa 100755 --- a/static/register.html +++ b/static/register.html @@ -4,8 +4,8 @@ - - + + diff --git a/static/register.js b/static/register.js deleted file mode 100755 index 89a37fa..0000000 --- a/static/register.js +++ /dev/null @@ -1,62 +0,0 @@ -function validateNick(n) { - if (n.length <= 2) { - return "BAD_NICK_LENGTH"; - } -} - -function submitRegistration() { - var nick = $('#nickInput').val(); - var email = $('#emailInput').val(); - var password = $('#passwordInput').val() || ""; - var hash = hex_sha1(nick + '$' + password + '$dumpfm'); - - if (nick.length < 3) { - alert("Nicks must be at least 3 characters long."); - return; - } else if (password.length < 5) { - alert("Password must be at least 5 characters long."); - return; - } - - var onSuccess = function() { - location.href = "/"; - }; - - var onError = function(resp) { - var respText = resp.responseText ? resp.responseText.trim() : false; - if (respText == 'NICK_TAKEN') { - alert("That nick is already taken! Please choose another."); - } else if (respText == 'NICK_INVALID_CHARS') { - alert("Nicks can only contain letters and numbers."); - } else { - alert("Unable to register!"); - } - }; - - $.ajax({ - type: 'GET', - timeout: 5000, - url: 'submit-registration', - data: {'nick': nick, 'email': email, 'hash': hash }, - cache: false, - dataType: 'json', - success: onSuccess, - error: onError - - }); -} - -function initRegister() { - $('#submit').click(submitRegistration); -} - -function handleMsgError(resp) { - var respText = resp.responseText ? resp.responseText.trim() : false; - if (respText == 'UNKNOWN_USER') { - alert("Can't send message! Please login."); - } else if (respText) { - alert("Cannot send message! (" + respText + ")"); - } else { - alert("Cannot send message!"); - } -} \ No newline at end of file -- cgit v1.2.3-70-g09d2