1 /* vim: set expandtab sw=4 ts=4 sts=4: */
6 function show_hide_clauses($thisDropdown)
8 // here, one span contains the label and the clause dropdown
9 // and we have one span for ON DELETE and one for ON UPDATE
11 if ($thisDropdown.val() !== '') {
12 $thisDropdown.parent().nextAll('span').show();
14 $thisDropdown.parent().nextAll('span').hide();
19 * Unbind all event handlers before tearing down a page
21 AJAX.registerTeardown('tbl_relation.js', function () {
22 $('select.referenced_column_dropdown').unbind('change');
25 AJAX.registerOnload('tbl_relation.js', function () {
27 $('select.referenced_column_dropdown').each(function (index, one_dropdown) {
28 show_hide_clauses($(one_dropdown));
31 $('select.referenced_column_dropdown').change(function () {
32 show_hide_clauses($(this));