Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue #05204: Action on selected tokens doesn't process
Dev Fix invalid JavaScript causing errors in IE7 and unselected tokens to be deleted Dev Prevent token-delete function from firing if no tokens selected git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@10134 b72ed6b6-b9f8-46b5-92b4-906544132732
- Loading branch information
Tony Partner
committed
May 27, 2011
1 parent
8a342a3
commit 7277aa6
Showing
2 changed files
with
72 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,70 @@ | ||
// $Id: tokens.js 8633 2010-04-25 12:57:33Z c_schmitz | ||
$(document).ready(function(){ | ||
$("#bounceprocessing").change(turnoff); | ||
turnoff(); | ||
$('img[id=bounceprocessing]').bind('click',function(){ | ||
$("#dialog-modal").dialog({ | ||
title: "Summary", | ||
modal: true, | ||
autoOpen: false, | ||
height: 200, | ||
width: 400, | ||
show: 'blind', | ||
hide: 'blind', | ||
}); | ||
checkbounces(surveyid); | ||
}); | ||
$("#filterduplicatetoken").change(function(){ | ||
if ($("#filterduplicatetoken").attr('checked')==true) | ||
{ | ||
$("#lifilterduplicatefields").slideDown(); | ||
} | ||
else | ||
{ | ||
$("#lifilterduplicatefields").slideUp(); | ||
} | ||
}) | ||
//Token checkbox toggles | ||
var tog=false; | ||
$('#tokencheckboxtoggle').click(function() { | ||
var selecteditems=''; | ||
$("input[type=checkbox]").attr("checked",!tog); | ||
$("input[type=checkbox]").each(function(index) { | ||
if($(this).attr("name") && $(this).attr("checked")) { | ||
selecteditems = selecteditems + "|" + $(this).attr("name"); | ||
/* alert(index + ': '+$(this).attr("name")); */ | ||
$('#tokenboxeschecked').val(selecteditems); | ||
/* alert(selecteditems); */ | ||
} | ||
}); | ||
tog=!tog; | ||
}); | ||
$('input[type=checkbox]').click(function() { | ||
var selecteditems=''; | ||
$("input[type=checkbox]").each(function(index) { | ||
if($(this).attr("name") && $(this).attr("checked")) { | ||
selecteditems = selecteditems + "|" + $(this).attr("name"); | ||
/* alert(index + ': '+$(this).attr("name")); */ | ||
$('#tokenboxeschecked').val(selecteditems); | ||
/* alert(selecteditems); */ | ||
} | ||
}); | ||
}); | ||
}); | ||
|
||
function checkbounces(surveyid) { | ||
$("#dialog-modal").dialog('open'); | ||
var url = 'admin.php?action=tokens&subaction=bounceprocessing&sid='+surveyid | ||
$('#dialog-modal').html('<p><img style="margin-top:42px" src="../images/ajax-loader.gif" width="200" height="25" /></p>'); | ||
$('#dialog-modal').load(url); | ||
} | ||
|
||
function turnoff(ui,evt) | ||
{ | ||
bounce_disabled=($("#bounceprocessing").val()=='N' || $("#bounceprocessing").val()=='G'); | ||
if (bounce_disabled==true) {bounce_disabled='disabled';} | ||
else {bounce_disabled='';} | ||
$("#bounceaccounttype").attr('disabled',bounce_disabled); | ||
$("#bounceaccounthost").attr('disabled',bounce_disabled); | ||
$("#bounceaccountuser").attr('disabled',bounce_disabled); | ||
$("#bounceaccountpass").attr('disabled',bounce_disabled); | ||
$("#bounceencryption").attr('disabled',bounce_disabled); | ||
$("#bounceaccountencryption").attr('disabled',bounce_disabled); | ||
} | ||
|
||
// $Id: tokens.js 8633 2010-04-25 12:57:33Z c_schmitz | ||
$(document).ready(function(){ | ||
$("#bounceprocessing").change(turnoff); | ||
turnoff(); | ||
$('img#bounceprocessing').bind('click',function(){ | ||
$("#dialog-modal").dialog({ | ||
title: "Summary", | ||
modal: true, | ||
autoOpen: false, | ||
height: 200, | ||
width: 400, | ||
show: 'blind', | ||
hide: 'blind' | ||
}); | ||
checkbounces(surveyid); | ||
}); | ||
$("#filterduplicatetoken").change(function(){ | ||
if ($("#filterduplicatetoken").attr('checked')==true) | ||
{ | ||
$("#lifilterduplicatefields").slideDown(); | ||
} | ||
else | ||
{ | ||
$("#lifilterduplicatefields").slideUp(); | ||
} | ||
}) | ||
//Token checkbox toggles | ||
var tog=false; | ||
$('#tokencheckboxtoggle').click(function() { | ||
var selecteditems=''; | ||
$("input[type=checkbox]").attr("checked",!tog); | ||
$("input[type=checkbox]").each(function(index) { | ||
if($(this).attr("name") && $(this).attr("checked")) { | ||
selecteditems = selecteditems + "|" + $(this).attr("name"); | ||
} | ||
}); | ||
$('#tokenboxeschecked').val(selecteditems); | ||
tog=!tog; | ||
}); | ||
$('input[type=checkbox]').click(function() { | ||
var selecteditems=''; | ||
$("input[type=checkbox]").each(function(index) { | ||
if($(this).attr("name") && $(this).attr("checked")) { | ||
selecteditems = selecteditems + "|" + $(this).attr("name"); | ||
} | ||
}); | ||
$('#tokenboxeschecked').val(selecteditems); | ||
}); | ||
}); | ||
|
||
function checkbounces(surveyid) { | ||
$("#dialog-modal").dialog('open'); | ||
var url = 'admin.php?action=tokens&subaction=bounceprocessing&sid='+surveyid | ||
$('#dialog-modal').html('<p><img style="margin-top:42px" src="../images/ajax-loader.gif" width="200" height="25" /></p>'); | ||
$('#dialog-modal').load(url); | ||
} | ||
|
||
function turnoff(ui,evt) | ||
{ | ||
bounce_disabled=($("#bounceprocessing").val()=='N' || $("#bounceprocessing").val()=='G'); | ||
if (bounce_disabled==true) {bounce_disabled='disabled';} | ||
else {bounce_disabled='';} | ||
$("#bounceaccounttype").attr('disabled',bounce_disabled); | ||
$("#bounceaccounthost").attr('disabled',bounce_disabled); | ||
$("#bounceaccountuser").attr('disabled',bounce_disabled); | ||
$("#bounceaccountpass").attr('disabled',bounce_disabled); | ||
$("#bounceencryption").attr('disabled',bounce_disabled); | ||
$("#bounceaccountencryption").attr('disabled',bounce_disabled); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters