Merge branch 'master' of ssh://repo.or.cz/srv/git/phpmyadmin/madhuracj into OpenGIS
[phpmyadmin/madhuracj.git] / js / tbl_relation.js
blob74cb4092efc9de31fabee8dcb168e2b8f99e5928
1 /* vim: set expandtab sw=4 ts=4 sts=4: */
2 /**
3  * for tbl_relation.php
4  *
5  */
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
10     //
11     if (thisDropdown.val() != '') {
12         thisDropdown.parent().next('span').show().next('span').show();
13     } else {
14         thisDropdown.parent().next('span').hide().next('span').hide();
15     }
18 $(document).ready(function() {
19     // initial display
20     $('.referenced_column_dropdown').each(function(index, one_dropdown) {
21         show_hide_clauses($(one_dropdown));
22     });
23     // change
24     $('.referenced_column_dropdown').change(function() {
25         show_hide_clauses($(this));
26     });
27 });