Author: leidel
Date: Sat Dec 6 09:45:47 2008
New Revision: 266
Modified:
trunk/pages/media/pages/javascript/change_form.js
Log:
Small cosmetic change on confirmation JavaScript code
Modified: trunk/pages/media/pages/javascript/change_form.js
==============================================================================
--- trunk/pages/media/pages/javascript/change_form.js (original)
+++ trunk/pages/media/pages/javascript/change_form.js Sat Dec 6 09:45:47
2008
@@ -5,10 +5,9 @@
$.each(selects, function(i, name){
original_values[i] = $('#id_'+name)[0].selectedIndex;
$('#id_'+name).change(function() {
- var index = this.selectedIndex;
- if (index != original_values[i]) {
+ if (this.selectedIndex != original_values[i]) {
var array = window.location.href.split('?');
- var query = $.query.set(name,
this.options[index].value).toString();
+ var query = $.query.set(name,
this.options[this.selectedIndex].value).toString();
var answer = confirm(gettext("Are you sure you want to
change the "+name+" without saving the page first?"));
if (answer) {
window.location.href = array[0]+query;
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---