Skip to content

Commit

Permalink
Fixed issue #11525: Wrong JS at template.js breaks certain survey fea…
Browse files Browse the repository at this point in the history
…tures
  • Loading branch information
markusfluer committed Aug 8, 2016
1 parent 2c69a2d commit f717a82
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion templates/default/scripts/template.js
Expand Up @@ -106,7 +106,13 @@ $(document).ready(function()
// Make the label clickable
$('.label-clickable').each(function(){
var $that = $(this);
var $inputEl = $("#"+$that.attr('id').replace("label-", ""));
var attrId = $that.attr('id');
if(attrId!=undefined){
attrId = attrId.replace("label-", "");
} else {
attrId = "";
}
var $inputEl = $("#"+attrId);
$that.on('click', function(){
console.log($inputEl.attr('id'));
$inputEl.trigger( "click" );
Expand Down
8 changes: 7 additions & 1 deletion templates/news_paper/scripts/template.js
Expand Up @@ -106,7 +106,13 @@ $(document).ready(function()
// Make the label clickable
$('.label-clickable').each(function(){
var $that = $(this);
var $inputEl = $("#"+$that.attr('id').replace("label-", ""));
var attrId = $that.attr('id');
if(attrId!=undefined){
attrId = attrId.replace("label-", "");
} else {
attrId = "";
}
var $inputEl = $("#"+attrId);
$that.on('click', function(){
console.log($inputEl.attr('id'));
$inputEl.trigger( "click" );
Expand Down
8 changes: 7 additions & 1 deletion templates/ubuntu_orange/scripts/template.js
Expand Up @@ -106,7 +106,13 @@ $(document).ready(function()
// Make the label clickable
$('.label-clickable').each(function(){
var $that = $(this);
var $inputEl = $("#"+$that.attr('id').replace("label-", ""));
var attrId = $that.attr('id');
if(attrId!=undefined){
attrId = attrId.replace("label-", "");
} else {
attrId = "";
}
var $inputEl = $("#"+attrId);
$that.on('click', function(){
console.log($inputEl.attr('id'));
$inputEl.trigger( "click" );
Expand Down

0 comments on commit f717a82

Please sign in to comment.