Hi Marc,
I started working with my first task which is *"**Create table in navigation panel** - Currently this option loads new create table window. Instead of that we can provide a pop up dialog appears for creating table. (A dialog window which looks as table create options at the database operation section)".*
So I went through the current "create table" option in the database operation section and found how it works. It uses the "display_create_table.lib.php" form to get the name and the number of fields of the table. Then after it get submitted, it uses the jquery coding which is in the functions.js file to pop up the jquery dialog of the create user form.
How should I design the js functionality for new feature. I can add the js code to navigation.js file and use it to pop up the dialog, or else I have to use the same code which is in the functions.js file. But I think its better to add the code the navigation.js file because it is a navigation functionality. Please comment on this issue. Thank you.
Regards,
Thilanka.
Thilanka Kaushalya a écrit :
Hi Marc,
I started working with my first task which is *"*/*Create table in navigation panel*// - Currently this option loads new create table window. Instead of that we can provide a pop up dialog appears for creating table. (A dialog window which looks as table create options at the database operation section)"./
So I went through the current "create table" option in the database operation section and found how it works. It uses the "display_create_table.lib.php" form to get the name and the number of fields of the table. Then after it get submitted, it uses the jquery coding which is in the functions.js file to pop up the jquery dialog of the create user form.
How should I design the js functionality for new feature. I can add the js code to navigation.js file and use it to pop up the dialog, or else I have to use the same code which is in the functions.js file. But I think its better to add the code the navigation.js file because it is a navigation functionality. Please comment on this issue. Thank you.
Regards,
Thilanka.
Hi Thilanka, it makes sense to put your code in navigation.js but try to avoid code duplication between this file and what is already in functions.js.
Hi Marc,
it makes sense to put your code in navigation.js but try to avoid code duplication between this file and what is already in functions.js.
I tried to add a empty dialog within a navigation.js using the following code.
$('<div id="create_table_dialog"></div>') .dialog({ title: "CreateTable", height: 50, width: 90, buttons : button_options_error });
This popups a dialog box with "OK" button and the title. But, since navigation.php works within the scope of a frame, the dialog is restricted to the navigation area within the UI. The screen shot (first screen shot )of the result is here with the google doc [1]. I think this because PMA uses separate frames for navigation panel and the rest of the content. I need to improve the dialog box as it shows in the 2nd screen shot. How can I change the scope of the dialog box in order to popup it balanced in the page. Please help me on this issue.
[1] - https://docs.google.com/document/d/1g9WzTFQsCwKzBOHJpuS0XIaXhUClbVneZYeuDVuq...
Regards, Thilanka.
2011/5/10 Thilanka Kaushalya lgtkaushalya@gmail.com:
Hi Marc,
it makes sense to put your code in navigation.js but try to avoid code duplication between this file and what is already in functions.js.
I tried to add a empty dialog within a navigation.js using the following code. $('<div id="create_table_dialog"></div>') .dialog({ title: "CreateTable", height: 50, width: 90, buttons : button_options_error }); This popups a dialog box with "OK" button and the title. But, since navigation.php works within the scope of a frame, the dialog is restricted to the navigation area within the UI. The screen shot (first screen shot )of the result is here with the google doc [1]. I think this because PMA uses separate frames for navigation panel and the rest of the content. I need to improve the dialog box as it shows in the 2nd screen shot. How can I change the scope of the dialog box in order to popup it balanced in the page. Please help me on this issue. [1] - https://docs.google.com/document/d/1g9WzTFQsCwKzBOHJpuS0XIaXhUClbVneZYeuDVuq...
You create #create_table_dialog in navigation frame - try to do it in top frame or content frame. I'm not sure about browser policies on cross-frame DOM manipulation, so maybe you will have to do it in function located in top/content frame, not directly from navigation frame.
Le 2011-05-10 13:12, Thilanka Kaushalya a écrit :
Hi Marc,
it makes sense to put your code in navigation.js but try to avoid code duplication between this file and what is already in functions.js.
I tried to add a empty dialog within a navigation.js using the following code.
$('<div id="create_table_dialog"></div>') .dialog({ title: "CreateTable", height: 50, width: 90, buttons : button_options_error });
This popups a dialog box with "OK" button and the title. But, since navigation.php works within the scope of a frame, the dialog is restricted to the navigation area within the UI. The screen shot (first screen shot )of the result is here with the google doc [1]. I think this because PMA uses separate frames for navigation panel and the rest of the content. I need to improve the dialog box as it shows in the 2nd screen shot. How can I change the scope of the dialog box in order to popup it balanced in the page. Please help me on this issue.
[1] - https://docs.google.com/document/d/1g9WzTFQsCwKzBOHJpuS0XIaXhUClbVneZYeuDVuq...
Regards, Thilanka.
Hi Thilanka, maybe this can help (see the first answer):
http://stackoverflow.com/questions/539504/run-jquery-in-the-context-of-anoth...