| 1 |
// $Id: paging.admin.js,v 1.2 2008/10/17 14:00:06 Gurpartap Exp $ |
// $Id: paging.admin.js,v 1.3 2009/01/17 02:22:34 Gurpartap Exp $ |
| 2 |
|
|
| 3 |
/** |
/** |
| 4 |
* Vertical tabs node form layout (aka drawers). |
* Vertical tabs node form layout (aka drawers). |
| 33 |
// Set the height of the container to a fixed size. |
// Set the height of the container to a fixed size. |
| 34 |
$('#paging-vertical-tabs').height(maxHeight); |
$('#paging-vertical-tabs').height(maxHeight); |
| 35 |
|
|
| 36 |
$(".paging-method input[@type=radio]").bind("change", paging_automatic_handler).each(paging_automatic_handler); |
$(".paging-method input[type=radio]").bind("change", paging_automatic_handler).each(paging_automatic_handler); |
| 37 |
$(".paging-pager input[@type=radio]").bind("change", paging_pager_handler).each(paging_pager_handler); |
$(".paging-pager input[type=radio]").bind("change", paging_pager_handler).each(paging_pager_handler); |
| 38 |
}); |
}); |
| 39 |
|
|
| 40 |
function paging_automatic_handler(event) { |
function paging_automatic_handler(event) { |
| 41 |
var type = $(this).attr('name').substr(24); |
var type = $(this).attr('name').substr(24); |
| 42 |
var checked = $('input[@name=paging_automatic_method_' + type + ']:checked').val(); |
var checked = $('input[name=paging_automatic_method_' + type + ']:checked').val(); |
| 43 |
$('.paging-chars-' + type + ', .paging-words-' + type).hide(); |
$('.paging-chars-' + type + ', .paging-words-' + type).hide(); |
| 44 |
$('input[@name=paging_names_enabled_' + type + ']').removeAttr('disabled'); |
$('input[name=paging_names_enabled_' + type + ']').removeAttr('disabled'); |
| 45 |
|
|
| 46 |
if (checked == 1) { |
if (checked == 1) { |
| 47 |
$('.paging-chars-' + type).fadeIn(500); |
$('.paging-chars-' + type).fadeIn(500); |
| 48 |
$('input[@name=paging_names_enabled_' + type + ']').removeAttr('checked'); |
$('input[name=paging_names_enabled_' + type + ']').removeAttr('checked'); |
| 49 |
$('input[@name=paging_names_enabled_' + type + ']').attr('disabled', 'disabled'); |
$('input[name=paging_names_enabled_' + type + ']').attr('disabled', 'disabled'); |
| 50 |
} |
} |
| 51 |
else if (checked == 2) { |
else if (checked == 2) { |
| 52 |
$('.paging-words-' + type).fadeIn(500); |
$('.paging-words-' + type).fadeIn(500); |
| 53 |
$('input[@name=paging_names_enabled_' + type + ']').removeAttr('checked'); |
$('input[name=paging_names_enabled_' + type + ']').removeAttr('checked'); |
| 54 |
$('input[@name=paging_names_enabled_' + type + ']').attr('disabled', 'disabled'); |
$('input[name=paging_names_enabled_' + type + ']').attr('disabled', 'disabled'); |
| 55 |
} |
} |
| 56 |
} |
} |
| 57 |
|
|
| 58 |
function paging_pager_handler(event) { |
function paging_pager_handler(event) { |
| 59 |
var type = $(this).attr('name').substr(20); |
var type = $(this).attr('name').substr(20); |
| 60 |
var checked = $('input[@name=paging_pager_widget_' + type + ']:checked').val(); |
var checked = $('input[name=paging_pager_widget_' + type + ']:checked').val(); |
| 61 |
$('.paging-pager-custom-' + type).parent().hide(); |
$('.paging-pager-custom-' + type).parent().hide(); |
| 62 |
|
|
| 63 |
if (checked == 'custom') { |
if (checked == 'custom') { |