Skip to content

Commit

Permalink
Dev Rewrote the table cell click script in jQuery
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8818 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Jun 8, 2010
1 parent b3cc7a3 commit 246dccb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/survey_runtime.js
Expand Up @@ -63,7 +63,7 @@ function match_regex(testedstring,str_regexp)

function prepareCellAdapters()
{
$('TD INPUT[type=radio]:first-child,TD INPUT[type=checkbox]:first-child').each( function(){
$('TD INPUT[type=radio],TD INPUT[type=checkbox]').each( function(){
$(this).parents('TD').click(function(evt){
if($('INPUT[type=radio],INPUT[type=checkbox]',this).length==1)
{
Expand All @@ -72,14 +72,14 @@ function prepareCellAdapters()
if (this.type == 'radio')
{
this.checked = true;
if(this.onclick) this.onclick(evt);
if(this.onchange) this.onchange(evt);
this.click();
this.change();
}
else if (this.type == 'checkbox')
{
this.checked = !this.checked;
if(this.onclick) this.onclick(evt);
if(this.onchange) this.onchange(evt);
this.click();
this.change();
};
});
}
Expand Down

0 comments on commit 246dccb

Please sign in to comment.