M.core_rating={ Y : null, transaction : [], init : function(Y){ this.Y = Y; Y.all('select.postratingmenu').each(this.attach_rating_events, this); //hide the submit buttons this.Y.all('input.postratingmenusubmit').setStyle('display', 'none'); }, attach_rating_events : function(selectnode) { selectnode.on('change', this.submit_rating, this, selectnode); }, submit_rating : function(e, selectnode){ var theinputs = selectnode.ancestor('form').all('.ratinginput'); var thedata = []; var inputssize = theinputs.size(); for ( var i=0; i 0) { node.set('innerHTML',"("+data.count+")"); } else { node.set('innerHTML',""); } } return true; } else if (data.error){ alert(data.error); } } catch(e) { alert(e.message+" "+outcome.responseText); } return false; } }, context : this, arguments : { //query : this.query.get('value') } }),complete:false,outcome:null}); this.Y.io.queue.start(); } };