');
+ rater.append(star);
+
+ // inherit attributes from input element
+ if(this.id) star.attr('id', this.id);
+ if(this.className) star.addClass(this.className);
+
+ // Half-stars?
+ if(control.half) control.split = 2;
+
+ // Prepare division control
+ if(typeof control.split=='number' && control.split>0){
+ var stw = ($.fn.width ? star.width() : 0) || control.starWidth;
+ var spi = (control.count % control.split), spw = Math.floor(stw/control.split);
+ star
+ // restrict star's width and hide overflow (already in CSS)
+ .width(spw)
+ // move the star left by using a negative margin
+ // this is work-around to IE's stupid box model (position:relative doesn't work)
+ .find('a').css({ 'margin-left':'-'+ (spi*spw) +'px' })
+ };
+
+ // readOnly?
+ if(control.readOnly)//{ //save a byte!
+ // Mark star as readOnly so user can customize display
+ star.addClass('star-rating-readonly');
+ //} //save a byte!
+ else//{ //save a byte!
+ // Enable hover css effects
+ star.addClass('star-rating-live')
+ // Attach mouse events
+ .mouseover(function(){
+ $(this).rating('fill');
+ $(this).rating('focus');
+ })
+ .mouseout(function(){
+ $(this).rating('draw');
+ $(this).rating('blur');
+ })
+ .click(function(){
+ $(this).rating('select');
+ })
+ ;
+ //}; //save a byte!
+
+ // set current selection
+ if(this.checked) control.current = star;
+
+ // hide input element
+ input.hide();
+
+ // backward compatibility, form element to plugin
+ input.change(function(){
+ $(this).rating('select');
+ });
+
+ // attach reference to star to input element and vice-versa
+ star.data('rating.input', input.data('rating.star', star));
+
+ // store control information in form (or body when form not available)
+ control.stars[control.stars.length] = star[0];
+ control.inputs[control.inputs.length] = input[0];
+ control.rater = raters[eid] = rater;
+ control.context = context;
+
+ input.data('rating', control);
+ rater.data('rating', control);
+ star.data('rating', control);
+ context.data('rating', raters);
+ }); // each element
+
+ // Initialize ratings (first draw)
+ $('.rating-to-be-drawn').rating('draw').removeClass('rating-to-be-drawn');
+
+ return this; // don't break the chain...
+ };
+
+ /*--------------------------------------------------------*/
+
+ /*
+ ### Core functionality and API ###
+ */
+ $.extend($.fn.rating, {
+ // Used to append a unique serial number to internal control ID
+ // each time the plugin is invoked so same name controls can co-exist
+ calls: 0,
+
+ focus: function(){
+ var control = this.data('rating'); if(!control) return this;
+ if(!control.focus) return this; // quick fail if not required
+ // find data for event
+ var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null );
+ // focus handler, as requested by focusdigital.co.uk
+ if(control.focus) control.focus.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]);
+ }, // $.fn.rating.focus
+
+ blur: function(){
+ var control = this.data('rating'); if(!control) return this;
+ if(!control.blur) return this; // quick fail if not required
+ // find data for event
+ var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null );
+ // blur handler, as requested by focusdigital.co.uk
+ if(control.blur) control.blur.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]);
+ }, // $.fn.rating.blur
+
+ fill: function(){ // fill to the current mouse position.
+ var control = this.data('rating'); if(!control) return this;
+ // do not execute when control is in read-only mode
+ if(control.readOnly) return;
+ // Reset all stars and highlight them up to this element
+ this.rating('drain');
+ this.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-hover');
+ },// $.fn.rating.fill
+
+ drain: function() { // drain all the stars.
+ var control = this.data('rating'); if(!control) return this;
+ // do not execute when control is in read-only mode
+ if(control.readOnly) return;
+ // Reset all stars
+ control.rater.children().filter('.rater-'+ control.serial).removeClass('star-rating-on').removeClass('star-rating-hover');
+ },// $.fn.rating.drain
+
+ draw: function(){ // set value and stars to reflect current selection
+ var control = this.data('rating'); if(!control) return this;
+ // Clear all stars
+ this.rating('drain');
+ // Set control value
+ if(control.current){
+ control.current.data('rating.input').attr('checked','checked');
+ control.current.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-on');
+ }
+ else
+ $(control.inputs).removeAttr('checked');
+ // Show/hide 'cancel' button
+ control.cancel[control.readOnly || control.required?'hide':'show']();
+ // Add/remove read-only classes to remove hand pointer
+ this.siblings()[control.readOnly?'addClass':'removeClass']('star-rating-readonly');
+ },// $.fn.rating.draw
+
+ select: function(value){ // select a value
+ var control = this.data('rating'); if(!control) return this;
+ // do not execute when control is in read-only mode
+ if(control.readOnly) return;
+ // clear selection
+ control.current = null;
+ // programmatically (based on user input)
+ if(typeof value!='undefined'){
+ // select by index (0 based)
+ if(typeof value=='number')
+ return $(control.stars[value]).rating('select');
+ // select by literal value (must be passed as a string
+ if(typeof value=='string')
+ //return
+ $.each(control.stars, function(){
+ if($(this).data('rating.input').val()==value) $(this).rating('select');
+ });
+ }
+ else
+ control.current = this[0].tagName=='INPUT' ?
+ this.data('rating.star') :
+ (this.is('.rater-'+ control.serial) ? this : null);
+
+ // Update rating control state
+ this.data('rating', control);
+ // Update display
+ this.rating('draw');
+ // find data for event
+ var input = $( control.current ? control.current.data('rating.input') : null );
+ // click callback, as requested here: http://plugins.jquery.com/node/1655
+ if(control.callback) control.callback.apply(input[0], [input.val(), $('a', control.current)[0]]);// callback event
+ },// $.fn.rating.select
+
+ readOnly: function(toggle, disable){ // make the control read-only (still submits value)
+ var control = this.data('rating'); if(!control) return this;
+ // setread-only status
+ control.readOnly = toggle || toggle==undefined ? true : false;
+ // enable/disable control value submission
+ if(disable) $(control.inputs).attr("disabled", "disabled");
+ else $(control.inputs).removeAttr("disabled");
+ // Update rating control state
+ this.data('rating', control);
+ // Update display
+ this.rating('draw');
+ },// $.fn.rating.readOnly
+
+ disable: function(){ // make read-only and never submit value
+ this.rating('readOnly', true, true);
+ },// $.fn.rating.disable
+
+ enable: function(){ // make read/write and submit value
+ this.rating('readOnly', false, false);
+ }// $.fn.rating.select
+
+ });
+
+ /*--------------------------------------------------------*/
+
+ /*
+ ### Default Settings ###
+ eg.: You can override default control like this:
+ $.fn.rating.options.cancel = 'Clear';
+ */
+ $.fn.rating.options = { //$.extend($.fn.rating, { options: {
+ cancel: 'Cancel Rating', // advisory title for the 'cancel' link
+ cancelValue: '', // value to submit when user click the 'cancel' link
+ split: 0, // split the star into how many parts?
+
+ // Width of star image in case the plugin can't work it out. This can happen if
+ // the jQuery.dimensions plugin is not available OR the image is hidden at installation
+ starWidth: 16//,
+
+ //NB.: These don't need to be pre-defined (can be undefined/null) so let's save some code!
+ //half: false, // just a shortcut to control.split = 2
+ //required: false, // disables the 'cancel' button so user can only select one of the specified values
+ //readOnly: false, // disable rating plugin interaction/ values cannot be changed
+ //focus: function(){}, // executed when stars are focused
+ //blur: function(){}, // executed when stars are focused
+ //callback: function(){}, // executed when a star is clicked
+ }; //} });
+
+ /*--------------------------------------------------------*/
+
+ /*
+ ### Default implementation ###
+ The plugin will attach itself to file inputs
+ with the class 'multi' when the page loads
+ */
+ $(function(){
+ $('input[type=radio].star').rating();
+ });
+
+
+
+/*# AVOID COLLISIONS #*/
+})(jQuery);
+/*# AVOID COLLISIONS #*/
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/images/loading.gif
Binary file app/site-content/images/loading.gif has changed
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/images/login-page-bg.jpg
Binary file app/site-content/images/login-page-bg.jpg has changed
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/images/purrBottom.png
Binary file app/site-content/images/purrBottom.png has changed
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/images/purrClose.png
Binary file app/site-content/images/purrClose.png has changed
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/images/purrTop.png
Binary file app/site-content/images/purrTop.png has changed
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/images/star.gif
Binary file app/site-content/images/star.gif has changed
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/js/jquery.chainedSelects.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/js/jquery.chainedSelects.js Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,85 @@
+/**
+* Chained Selects for jQuery
+* Copyright (C) 2008 Ziadin Givan www.CodeAssembly.com
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see http://www.gnu.org/licenses/
+*
+*
+* settings = { usePost : true, before:function() {}, after: function() {}, default: null, parameters : { parameter1 : 'value1', parameter2 : 'value2'} }
+* if usePost is true, then the form will use POST to pass the parameters to the target, otherwise will use GET
+* "before" function is called before the ajax request and "after" function is called after the ajax request.
+* If defaultValue is not null then the specified option will be selected.
+* You can specify additional parameters to be sent to the the server in settings.parameters.
+*
+*/
+jQuery.fn.chainSelect = function( target, url, settings )
+{
+ return this.each( function()
+ {
+ $(this).change( function( )
+ {
+ settings = jQuery.extend(
+ {
+ after : null,
+ before : null,
+ usePost : false,
+ defaultValue : null,
+ parameters : {'_id' : $(this).attr('id'), '_name' : $(this).attr('name')}
+ } , settings);
+
+ settings.parameters._value = $(this).val();
+
+ if (settings.before != null)
+ {
+ settings.before( target );
+ }
+
+ ajaxCallback = function(data, textStatus)
+ {
+ $(target).html("");//clear old options
+ data = eval(data);//get json array
+ for (i = 0; i < data.length; i++)//iterate over all options
+ {
+ for ( key in data[i] )//get key => value
+ {
+ $(target).get(0).add(new Option(data[i][key],[key]), document.all ? i : null);
+ }
+ }
+
+ if (settings.defaultValue != null)
+ {
+ $(target).val(settings.defaultValue);//select default value
+ } else
+ {
+ $("option:first", target).attr( "selected", "selected" );//select first option
+ }
+
+ if (settings.after != null)
+ {
+ settings.after(target);
+ }
+
+ $(target).change();//call next chain
+ };
+
+ if (settings.usePost == true)
+ {
+ $.post( url, settings.parameters, ajaxCallback );
+ } else
+ {
+ $.get( url, settings.parameters, ajaxCallback );
+ }
+ });
+ });
+};
\ No newline at end of file
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/js/jquery.colorbox-min.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/js/jquery.colorbox-min.js Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,3 @@
+// ColorBox v1.2.7 - a full featured, light-weight, customizable lightbox based on jQuery 1.3
+
+(function(B){var G,V,W,d,z,k,b,F,c,Q,D,e,s,j,m,P,l,H,t;var X,i,g,a,p,A,T,w,I,q="colorbox",o="hover";var y,f,R,L,K,J,r,M;var x="cbox_open",O="cbox_load",u="cbox_complete",h="cbox_close",n="cbox_closed";var C={transition:"elastic",speed:350,width:false,height:false,initialWidth:"400",initialHeight:"400",maxWidth:false,maxHeight:false,resize:true,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:true,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,overlayClose:true,slideshow:false,slideshowAuto:true,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow"};B(function(){R()});function N(Y){if(Y.keyCode==37){Y.preventDefault();H.click()}else{if(Y.keyCode==39){Y.preventDefault();l.click()}}}function E(Y,Z){Z=Z=="x"?document.documentElement.clientWidth:document.documentElement.clientHeight;return(typeof Y=="string")?(Y.match(/%/)?(Z/100)*parseInt(Y,10):parseInt(Y,10)):Y}function v(Y){return T.photo?true:Y.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(.*))?$/i)}function U(){for(var Y in T){if(typeof(T[Y])=="function"){T[Y]=T[Y].call(p)}}}B.fn.colorbox=function(Z,Y){if(this.length){this.each(function(){var aa=B(this).data(q)?B.extend({},B(this).data(q),Z):B.extend({},C,Z);B(this).data(q,aa).addClass("cboxelement")})}else{B(this).data(q,B.extend({},C,Z))}B(this).unbind("click.colorbox").bind("click.colorbox",function(ab){p=this;T=B(p).data(q);U();B().bind("keydown.cbox_close",function(ac){if(ac.keyCode==27){ac.preventDefault();t.click()}});if(T.overlayClose===true){G.css({cursor:"pointer"}).one("click",M)}p.blur();I=Y||false;var aa=T.rel||p.rel;if(aa&&aa!="nofollow"){c=B(".cboxelement").filter(function(){var ac=B(this).data(q).rel||this.rel;return(ac==aa)});A=c.index(p);if(A<0){c=c.add(p);A=c.length-1}}else{c=B(p);A=0}if(!w){B.event.trigger(x);t.html(T.close);G.css({opacity:T.opacity}).show();w=true;K(E(T.initialWidth,"x"),E(T.initialHeight,"y"),0);if(B.browser.msie&&B.browser.version<7){Q.bind("resize.cboxie6 scroll.cboxie6",function(){G.css({width:Q.width(),height:Q.height(),top:Q.scrollTop(),left:Q.scrollLeft()})})}}r();L();ab.preventDefault()});if(Z&&Z.open){B(this).triggerHandler("click.colorbox")}return this};R=function(){function Y(Z){return B('')}Q=B(window);V=B('');G=Y("Overlay").hide();W=Y("Wrapper");d=Y("Content").append(D=Y("LoadedContent").css({width:0,height:0}),e=Y("LoadingOverlay"),s=Y("LoadingGraphic"),j=Y("Title"),m=Y("Current"),P=Y("Slideshow"),l=Y("Next"),H=Y("Previous"),t=Y("Close"));W.append(B("").append(Y("TopLeft"),z=Y("TopCenter"),Y("TopRight")),B("").append(k=Y("MiddleLeft"),d,b=Y("MiddleRight")),B("").append(Y("BottomLeft"),F=Y("BottomCenter"),Y("BottomRight"))).children().children().css({"float":"left"});B("body").prepend(G,V.append(W));if(B.browser.msie&&B.browser.version<7){G.css("position","absolute")}d.children().addClass(o).mouseover(function(){B(this).addClass(o)}).mouseout(function(){B(this).removeClass(o)}).hide();X=z.height()+F.height()+d.outerHeight(true)-d.height();i=k.width()+b.width()+d.outerWidth(true)-d.width();g=D.outerHeight(true);a=D.outerWidth(true);V.css({"padding-bottom":X,"padding-right":i}).hide();l.click(f);H.click(y);t.click(M);d.children().removeClass(o)};K=function(ab,aa,Z,ac){var ad=document.documentElement.clientHeight;var af=ad/2-aa/2;var ae=document.documentElement.clientWidth/2-ab/2;if(aa>ad){af-=(aa-ad)}if(af<0){af=0}if(ae<0){ae=0}af+=Q.scrollTop();ae+=Q.scrollLeft();ab=ab-i;aa=aa-X;W[0].style.width=W[0].style.height="9999px";function ag(ah){z[0].style.width=F[0].style.width=d[0].style.width=ah.style.width;s[0].style.height=e[0].style.height=d[0].style.height=k[0].style.height=b[0].style.height=ah.style.height}var Y=(V.width()===ab&&V.height()===aa)?0:Z;V.dequeue().animate({height:aa,width:ab,top:af,left:ae},{duration:Y,complete:function(){ag(this);W[0].style.width=(ab+i)+"px";W[0].style.height=(aa+X)+"px";if(ac){ac()}},step:function(){ag(this)}})};J=function(ad){if(!w){return}Q.unbind("resize.cbox_resize");var ab=T.transition=="none"?0:T.speed;D.remove();D=B(ad);var Z;var aj;function ah(){if(T.width){Z=maxWidth}else{Z=maxWidth&&maxWidth0?ae:0)+"px"}function ai(am){var al=Z+a+i;var an=aj+g+X;K(al,an,am,function(){if(!w){return}if(B.browser.msie){if(Y){D.fadeIn(100)}V.css("filter","")}d.children().show();B("#cboxIframeTemp").after("").remove();e.hide();s.hide();P.hide();if(c.length>1){m.html(T.current.replace(/\{current\}/,A+1).replace(/\{total\}/,c.length));l.html(T.next);H.html(T.previous);B().unbind("keydown",N).one("keydown",N);if(T.slideshow){P.show()}}else{m.hide();l.hide();H.hide()}j.html(T.title||p.title);B.event.trigger(u);if(I){I.call(p)}if(T.transition==="fade"){V.fadeTo(ab,1,function(){if(B.browser.msie){d.css("filter","")}})}Q.bind("resize.cbox_resize",function(){K(al,an,0)})})}if(T.transition=="fade"){V.fadeTo(ab,0,function(){ai(0)})}else{ai(ab)}if(T.preloading&&c.length>1){var ac=A>0?c[A-1]:c[c.length-1];var af=A").attr("src",ak)}if(v(aa)){B("").attr("src",aa)}}};L=function(){p=c[A];T=B(p).data(q);U();B.event.trigger(O);e.show();s.show();t.show();var Y=T.height?E(T.height,"y")-g-X:false;var ab=T.width?E(T.width,"x")-a-i:false;if(T.maxHeight){maxHeight=T.maxHeight?E(T.maxHeight,"y")-g-X:false;Y=Y&&Y').hide().insertBefore(B(Z)[0]).bind(O+" "+h,function(){D.children().insertBefore(this);B(this).remove()});J(B(Z).wrapAll("").parent())}else{if(T.iframe){J(B("
');
+ rater.append(star);
+
+ // inherit attributes from input element
+ if(this.id) star.attr('id', this.id);
+ if(this.className) star.addClass(this.className);
+
+ // Half-stars?
+ if(control.half) control.split = 2;
+
+ // Prepare division control
+ if(typeof control.split=='number' && control.split>0){
+ var stw = ($.fn.width ? star.width() : 0) || control.starWidth;
+ var spi = (control.count % control.split), spw = Math.floor(stw/control.split);
+ star
+ // restrict star's width and hide overflow (already in CSS)
+ .width(spw)
+ // move the star left by using a negative margin
+ // this is work-around to IE's stupid box model (position:relative doesn't work)
+ .find('a').css({ 'margin-left':'-'+ (spi*spw) +'px' })
+ };
+
+ // readOnly?
+ if(control.readOnly)//{ //save a byte!
+ // Mark star as readOnly so user can customize display
+ star.addClass('star-rating-readonly');
+ //} //save a byte!
+ else//{ //save a byte!
+ // Enable hover css effects
+ star.addClass('star-rating-live')
+ // Attach mouse events
+ .mouseover(function(){
+ $(this).rating('fill');
+ $(this).rating('focus');
+ })
+ .mouseout(function(){
+ $(this).rating('draw');
+ $(this).rating('blur');
+ })
+ .click(function(){
+ $(this).rating('select');
+ })
+ ;
+ //}; //save a byte!
+
+ // set current selection
+ if(this.checked) control.current = star;
+
+ // hide input element
+ input.hide();
+
+ // backward compatibility, form element to plugin
+ input.change(function(){
+ $(this).rating('select');
+ });
+
+ // attach reference to star to input element and vice-versa
+ star.data('rating.input', input.data('rating.star', star));
+
+ // store control information in form (or body when form not available)
+ control.stars[control.stars.length] = star[0];
+ control.inputs[control.inputs.length] = input[0];
+ control.rater = raters[eid] = rater;
+ control.context = context;
+
+ input.data('rating', control);
+ rater.data('rating', control);
+ star.data('rating', control);
+ context.data('rating', raters);
+ }); // each element
+
+ // Initialize ratings (first draw)
+ $('.rating-to-be-drawn').rating('draw').removeClass('rating-to-be-drawn');
+
+ return this; // don't break the chain...
+ };
+
+ /*--------------------------------------------------------*/
+
+ /*
+ ### Core functionality and API ###
+ */
+ $.extend($.fn.rating, {
+ // Used to append a unique serial number to internal control ID
+ // each time the plugin is invoked so same name controls can co-exist
+ calls: 0,
+
+ focus: function(){
+ var control = this.data('rating'); if(!control) return this;
+ if(!control.focus) return this; // quick fail if not required
+ // find data for event
+ var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null );
+ // focus handler, as requested by focusdigital.co.uk
+ if(control.focus) control.focus.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]);
+ }, // $.fn.rating.focus
+
+ blur: function(){
+ var control = this.data('rating'); if(!control) return this;
+ if(!control.blur) return this; // quick fail if not required
+ // find data for event
+ var input = $(this).data('rating.input') || $( this.tagName=='INPUT' ? this : null );
+ // blur handler, as requested by focusdigital.co.uk
+ if(control.blur) control.blur.apply(input[0], [input.val(), $('a', input.data('rating.star'))[0]]);
+ }, // $.fn.rating.blur
+
+ fill: function(){ // fill to the current mouse position.
+ var control = this.data('rating'); if(!control) return this;
+ // do not execute when control is in read-only mode
+ if(control.readOnly) return;
+ // Reset all stars and highlight them up to this element
+ this.rating('drain');
+ this.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-hover');
+ },// $.fn.rating.fill
+
+ drain: function() { // drain all the stars.
+ var control = this.data('rating'); if(!control) return this;
+ // do not execute when control is in read-only mode
+ if(control.readOnly) return;
+ // Reset all stars
+ control.rater.children().filter('.rater-'+ control.serial).removeClass('star-rating-on').removeClass('star-rating-hover');
+ },// $.fn.rating.drain
+
+ draw: function(){ // set value and stars to reflect current selection
+ var control = this.data('rating'); if(!control) return this;
+ // Clear all stars
+ this.rating('drain');
+ // Set control value
+ if(control.current){
+ control.current.data('rating.input').attr('checked','checked');
+ control.current.prevAll().andSelf().filter('.rater-'+ control.serial).addClass('star-rating-on');
+ }
+ else
+ $(control.inputs).removeAttr('checked');
+ // Show/hide 'cancel' button
+ control.cancel[control.readOnly || control.required?'hide':'show']();
+ // Add/remove read-only classes to remove hand pointer
+ this.siblings()[control.readOnly?'addClass':'removeClass']('star-rating-readonly');
+ },// $.fn.rating.draw
+
+ select: function(value){ // select a value
+ var control = this.data('rating'); if(!control) return this;
+ // do not execute when control is in read-only mode
+ if(control.readOnly) return;
+ // clear selection
+ control.current = null;
+ // programmatically (based on user input)
+ if(typeof value!='undefined'){
+ // select by index (0 based)
+ if(typeof value=='number')
+ return $(control.stars[value]).rating('select');
+ // select by literal value (must be passed as a string
+ if(typeof value=='string')
+ //return
+ $.each(control.stars, function(){
+ if($(this).data('rating.input').val()==value) $(this).rating('select');
+ });
+ }
+ else
+ control.current = this[0].tagName=='INPUT' ?
+ this.data('rating.star') :
+ (this.is('.rater-'+ control.serial) ? this : null);
+
+ // Update rating control state
+ this.data('rating', control);
+ // Update display
+ this.rating('draw');
+ // find data for event
+ var input = $( control.current ? control.current.data('rating.input') : null );
+ // click callback, as requested here: http://plugins.jquery.com/node/1655
+ if(control.callback) control.callback.apply(input[0], [input.val(), $('a', control.current)[0]]);// callback event
+ },// $.fn.rating.select
+
+ readOnly: function(toggle, disable){ // make the control read-only (still submits value)
+ var control = this.data('rating'); if(!control) return this;
+ // setread-only status
+ control.readOnly = toggle || toggle==undefined ? true : false;
+ // enable/disable control value submission
+ if(disable) $(control.inputs).attr("disabled", "disabled");
+ else $(control.inputs).removeAttr("disabled");
+ // Update rating control state
+ this.data('rating', control);
+ // Update display
+ this.rating('draw');
+ },// $.fn.rating.readOnly
+
+ disable: function(){ // make read-only and never submit value
+ this.rating('readOnly', true, true);
+ },// $.fn.rating.disable
+
+ enable: function(){ // make read/write and submit value
+ this.rating('readOnly', false, false);
+ }// $.fn.rating.select
+
+ });
+
+ /*--------------------------------------------------------*/
+
+ /*
+ ### Default Settings ###
+ eg.: You can override default control like this:
+ $.fn.rating.options.cancel = 'Clear';
+ */
+ $.fn.rating.options = { //$.extend($.fn.rating, { options: {
+ cancel: 'Cancel Rating', // advisory title for the 'cancel' link
+ cancelValue: '', // value to submit when user click the 'cancel' link
+ split: 0, // split the star into how many parts?
+
+ // Width of star image in case the plugin can't work it out. This can happen if
+ // the jQuery.dimensions plugin is not available OR the image is hidden at installation
+ starWidth: 16//,
+
+ //NB.: These don't need to be pre-defined (can be undefined/null) so let's save some code!
+ //half: false, // just a shortcut to control.split = 2
+ //required: false, // disables the 'cancel' button so user can only select one of the specified values
+ //readOnly: false, // disable rating plugin interaction/ values cannot be changed
+ //focus: function(){}, // executed when stars are focused
+ //blur: function(){}, // executed when stars are focused
+ //callback: function(){}, // executed when a star is clicked
+ }; //} });
+
+ /*--------------------------------------------------------*/
+
+ /*
+ ### Default implementation ###
+ The plugin will attach itself to file inputs
+ with the class 'multi' when the page loads
+ */
+ $(function(){
+ $('input[type=radio].star').rating();
+ });
+
+
+
+/*# AVOID COLLISIONS #*/
+})(jQuery);
+/*# AVOID COLLISIONS #*/
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/04/latexusrguide.pdf
Binary file app/site-content/proposals/2009/08/04/latexusrguide.pdf has changed
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/a.out
Binary file app/site-content/proposals/2009/08/06/a.out has changed
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/arm.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/arm.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+for i in range(100, 1000):
+ a = i % 10
+ b = (i / 10) % 10
+ c = (i / 100) % 10
+ if i == a ** 3 + b ** 3 + c ** 3:
+ print "Armstrong Number: ", i
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/arm_.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/arm_.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+for i in range(100, 1000):
+ a = i % 10
+ b = (i / 10) % 10
+ c = (i / 100) % 10
+ if i == a ** 3 + b ** 3 + c ** 3:
+ print "Armstrong Number: ", i
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/c.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/c.c Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,27 @@
+#include
+
+main()
+{
+
+ int n, count = 1;
+ float x, sum = 0,average;
+ do {
+ printf("how many numbers? ");
+ scanf("%d", &n);
+ sum = 0;
+ count = 1;
+ while (count <= n) {
+ printf("x = ");
+ printf("\n(to end program, enter 0 for x): ");
+ scanf("%f", &x);
+ if (x == 0)
+ break;
+ sum += x;
+ ++count;
+ }
+ average = sum/n;
+ printf("\nthe average is %f\n", average);
+ } while (x != 0);
+}
+
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/c_.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/c_.c Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,27 @@
+#include
+
+main()
+{
+
+ int n, count = 1;
+ float x, sum = 0,average;
+ do {
+ printf("how many numbers? ");
+ scanf("%d", &n);
+ sum = 0;
+ count = 1;
+ while (count <= n) {
+ printf("x = ");
+ printf("\n(to end program, enter 0 for x): ");
+ scanf("%f", &x);
+ if (x == 0)
+ break;
+ sum += x;
+ ++count;
+ }
+ average = sum/n;
+ printf("\nthe average is %f\n", average);
+ } while (x != 0);
+}
+
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/c__.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/c__.c Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,27 @@
+#include
+
+main()
+{
+
+ int n, count = 1;
+ float x, sum = 0,average;
+ do {
+ printf("how many numbers? ");
+ scanf("%d", &n);
+ sum = 0;
+ count = 1;
+ while (count <= n) {
+ printf("x = ");
+ printf("\n(to end program, enter 0 for x): ");
+ scanf("%f", &x);
+ if (x == 0)
+ break;
+ sum += x;
+ ++count;
+ }
+ average = sum/n;
+ printf("\nthe average is %f\n", average);
+ } while (x != 0);
+}
+
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/c___.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/c___.c Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,27 @@
+#include
+
+main()
+{
+
+ int n, count = 1;
+ float x, sum = 0,average;
+ do {
+ printf("how many numbers? ");
+ scanf("%d", &n);
+ sum = 0;
+ count = 1;
+ while (count <= n) {
+ printf("x = ");
+ printf("\n(to end program, enter 0 for x): ");
+ scanf("%f", &x);
+ if (x == 0)
+ break;
+ sum += x;
+ ++count;
+ }
+ average = sum/n;
+ printf("\nthe average is %f\n", average);
+ } while (x != 0);
+}
+
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/c____.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/c____.c Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,27 @@
+#include
+
+main()
+{
+
+ int n, count = 1;
+ float x, sum = 0,average;
+ do {
+ printf("how many numbers? ");
+ scanf("%d", &n);
+ sum = 0;
+ count = 1;
+ while (count <= n) {
+ printf("x = ");
+ printf("\n(to end program, enter 0 for x): ");
+ scanf("%f", &x);
+ if (x == 0)
+ break;
+ sum += x;
+ ++count;
+ }
+ average = sum/n;
+ printf("\nthe average is %f\n", average);
+ } while (x != 0);
+}
+
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/gcd.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/gcd.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+def gcd(a, b):
+ if a % b == 0:
+ return b
+ return gcd(b, a %b)
+
+print gcd (10, 20)
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/pytriads.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/pytriads.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+def pytriads():
+ for a in range(3, 100):
+ for b in range(a+1, 100):
+ if gcd(a, b) == 1:
+
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/pytriads_.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/pytriads_.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+def pytriads():
+ for a in range(3, 100):
+ for b in range(a+1, 100):
+ if gcd(a, b) == 1:
+
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/pytriads__.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/pytriads__.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+def pytriads():
+ for a in range(3, 100):
+ for b in range(a+1, 100):
+ if gcd(a, b) == 1:
+
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/test.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/test.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,5 @@
+a, b = 0, 1
+while b < 10:
+ print b,
+ a, b = b, a + b
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/06/test_.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/06/test_.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,5 @@
+a, b = 0, 1
+while b < 10:
+ print b,
+ a, b = b, a + b
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/07/arm.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/07/arm.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+for i in range(100, 1000):
+ a = i % 10
+ b = (i / 10) % 10
+ c = (i / 100) % 10
+ if i == a ** 3 + b ** 3 + c ** 3:
+ print "Armstrong Number: ", i
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/07/collatz.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/07/collatz.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,7 @@
+a = 343
+while a > 1:
+ print a
+ if a % 2:
+ a = a * 3 + 1
+ else:
+ a /= 2
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/07/gcd.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/07/gcd.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+def gcd(a, b):
+ if a % b == 0:
+ return b
+ return gcd(b, a %b)
+
+print gcd (10, 20)
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/07/proxy.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/07/proxy.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,93 @@
+# urllib2 opener to connection through a proxy using the CONNECT method, (useful for SSL)
+# tested with python 2.4
+
+import urllib2
+import urllib
+import httplib
+import socket
+
+
+class ProxyHTTPConnection(httplib.HTTPConnection):
+
+ _ports = {'http' : 80, 'https' : 443}
+
+
+ def request(self, method, url, body=None, headers={}):
+ #request is called before connect, so can interpret url and get
+ #real host/port to be used to make CONNECT request to proxy
+ proto, rest = urllib.splittype(url)
+ if proto is None:
+ raise ValueError, "unknown URL type: %s" % url
+ #get host
+ host, rest = urllib.splithost(rest)
+ #try to get port
+ host, port = urllib.splitport(host)
+ #if port is not defined try to get from proto
+ if port is None:
+ try:
+ port = self._ports[proto]
+ except KeyError:
+ raise ValueError, "unknown protocol for: %s" % url
+ self._real_host = host
+ self._real_port = port
+ httplib.HTTPConnection.request(self, method, url, body, headers)
+
+
+ def connect(self):
+ httplib.HTTPConnection.connect(self)
+ #send proxy CONNECT request
+ self.send("CONNECT %s:%d HTTP/1.0\r\n\r\n" % (self._real_host, self._real_port))
+ #expect a HTTP/1.0 200 Connection established
+ response = self.response_class(self.sock, strict=self.strict, method=self._method)
+ (version, code, message) = response._read_status()
+ #probably here we can handle auth requests...
+ if code != 200:
+ #proxy returned and error, abort connection, and raise exception
+ self.close()
+ raise socket.error, "Proxy connection failed: %d %s" % (code, message.strip())
+ #eat up header block from proxy....
+ while True:
+ #should not use directly fp probablu
+ line = response.fp.readline()
+ if line == '\r\n': break
+
+
+class ProxyHTTPSConnection(ProxyHTTPConnection):
+
+ default_port = 443
+
+ def __init__(self, host, port = None, key_file = None, cert_file = None, strict = None):
+ ProxyHTTPConnection.__init__(self, host, port)
+ self.key_file = key_file
+ self.cert_file = cert_file
+
+ def connect(self):
+ ProxyHTTPConnection.connect(self)
+ #make the sock ssl-aware
+ ssl = socket.ssl(self.sock, self.key_file, self.cert_file)
+ self.sock = httplib.FakeSocket(self.sock, ssl)
+
+
+class ConnectHTTPHandler(urllib2.HTTPHandler):
+
+ def do_open(self, http_class, req):
+ return urllib2.HTTPHandler.do_open(self, ProxyHTTPConnection, req)
+
+
+class ConnectHTTPSHandler(urllib2.HTTPSHandler):
+
+ def do_open(self, http_class, req):
+ return urllib2.HTTPSHandler.do_open(self, ProxyHTTPSConnection, req)
+
+
+if __name__ == '__main__':
+
+ import sys
+
+ opener = urllib2.build_opener(ConnectHTTPHandler, ConnectHTTPSHandler)
+ urllib2.install_opener(opener)
+ req = urllib2.Request(url='http://google.com')
+ req.set_proxy('10.101.1.1:80', 'http')
+ f = urllib2.urlopen(req)
+ print f.read()
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/07/pytriads.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/07/pytriads.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+def pytriads():
+ for a in range(3, 100):
+ for b in range(a+1, 100):
+ if gcd(a, b) == 1:
+
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/07/test.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/07/test.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,5 @@
+a, b = 0, 1
+while b < 10:
+ print b,
+ a, b = b, a + b
+
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/08/gcd.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/08/gcd.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+def gcd(a, b):
+ if a % b == 0:
+ return b
+ return gcd(b, a %b)
+
+print gcd (10, 20)
diff -r 2840389ee7f9 -r 21942fac2b4b app/site-content/proposals/2009/08/09/arm.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/site-content/proposals/2009/08/09/arm.py Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,6 @@
+for i in range(100, 1000):
+ a = i % 10
+ b = (i / 10) % 10
+ c = (i / 100) % 10
+ if i == a ** 3 + b ** 3 + c ** 3:
+ print "Armstrong Number: ", i
diff -r 2840389ee7f9 -r 21942fac2b4b app/templates/projrev/auth/create_account.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/templates/projrev/auth/create_account.html Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,54 @@
+{% extends "projrev/base.html" %}
+
+{% block stylesheets %}
+
+
+{% endblock stylesheets %}
+
+{% block scripts %}
+{{ block.super }}
+{% if exits or password_err %}
+
+{% endif %}
+{% endblock scripts %}
+
+{% block body %}
+
+
+
+
+ {% if exits %}
+ The Email ID already exists. Please close this box and enter another ID.
+ {% endif %}
+ {% if password_err %}
+ The passwords did not match. Please close the box and enter email ID and correct passwords again.
+ {% endif %}
+
+
+{% endblock body %}
\ No newline at end of file
diff -r 2840389ee7f9 -r 21942fac2b4b app/templates/projrev/auth/forgot_password.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/templates/projrev/auth/forgot_password.html Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,42 @@
+{% extends "projrev/base.html" %}
+{% block stylesheets %}
+
+
+{% endblock stylesheets %}
+
+{% block scripts %}
+{{ block.super }}
+{% if exits %}
+
+{% endif %}
+{% endblock scripts %}
+
+{% block body %}
+
+
+
+
+ {% if exits %}
+ The Email ID already exists. Please close this box and enter the correct ID.
+ {% endif %}
+
+
+{% endblock body %}
\ No newline at end of file
diff -r 2840389ee7f9 -r 21942fac2b4b app/templates/projrev/auth/login.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/app/templates/projrev/auth/login.html Mon Aug 10 16:38:13 2009 +0530
@@ -0,0 +1,49 @@
+{% extends "projrev/base.html" %}
+{% block stylesheets %}
+
+
+{% endblock stylesheets %}
+
+{% block scripts %}
+{{ block.super }}
+{% if error %}
+
+{% endif %}
+{% endblock scripts %}
+
+{% block body %}
+
+
+
+
+ {% if error %}
+ You have entered a wrong Email address or password. Please close this box and enter correct credentials.
+ {% endif %}
+
+
+{% endblock body %}
\ No newline at end of file
diff -r 2840389ee7f9 -r 21942fac2b4b app/templates/projrev/base.html
--- a/app/templates/projrev/base.html Thu Aug 06 18:49:06 2009 +0530
+++ b/app/templates/projrev/base.html Mon Aug 10 16:38:13 2009 +0530
@@ -11,12 +11,21 @@
{% block stylesheets %}
+
+
+
{% endblock stylesheets %}
{% block scripts %}
+
+
+
{% endblock scripts %}
National Mission on Education through ICT
@@ -33,7 +42,8 @@
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec libero. Suspendisse bibendum.
- Cras id urna. Morbi tincidunt, orci ac convallis aliquam, lectus turpis varius lorem, eu
- posuere nunc justo tempus leo.