Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / admin / xmldb / actions / view_table_php / view_table_php.js
blob3304925b2554421ed52f4e48291c774f8955eaa4
1 /// $Id $
3 ///////////////////////////////////////////////////////////////////////////
4 //                                                                       //
5 // NOTICE OF COPYRIGHT                                                   //
6 //                                                                       //
7 // Moodle - Modular Object-Oriented Dynamic Learning Environment         //
8 //          http://moodle.com                                            //
9 //                                                                       //
10 // Copyright (C) 1999 onwards Martin Dougiamas        http://dougiamas.com  //
11 //           (C) 2001-3001 Eloy Lafuente (stronk7) http://contiento.com  //
12 //                                                                       //
13 // This program is free software; you can redistribute it and/or modify  //
14 // it under the terms of the GNU General Public License as published by  //
15 // the Free Software Foundation; either version 2 of the License, or     //
16 // (at your option) any later version.                                   //
17 //                                                                       //
18 // This program is distributed in the hope that it will be useful,       //
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of        //
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
21 // GNU General Public License for more details:                          //
22 //                                                                       //
23 //          http://www.gnu.org/copyleft/gpl.html                         //
24 //                                                                       //
25 ///////////////////////////////////////////////////////////////////////////
27 /// Register the needed events
28     onload=function() {
29     /// Adjust the form on load
30         disablePopupHeads();
31     }
33 /**
34  * This function disables some elements from the command and from the fields/keys/indexes drop downs
35  */
36 function disablePopupHeads() {
37     var popup = document.getElementById("menucommand");
38     var i = popup.length;
39     while (i--) {
40         option = popup[i];
41         if (option.value == "Fields" || option.value == "Keys" || option.value == "Indexes") {
42             popup[i].disabled = true;
43         }
44     }
45     var popup = document.getElementById("menufieldkeyindex");
46     var i = popup.length;
47     while (i--) {
48         option = popup[i];
49         if (option.value == "fieldshead" || option.value == "keyshead" || option.value == "indexeshead") {
50             popup[i].disabled = true;
51         }
52     }