Hi Marc,
I worked with create table dialog and currently faced with some problems with it. I rewrote the table_create click event in the navigation.js and it popups the dialog correctly with the form. Then for the form submit and increase the number of fields withing the dialog, I used same code which was at the functions.js. Currently following scenarios are working as follows.
1. Create a table using the link at navigation bar - works correctly 2. Create a table using the form at the db_structure and db_operations - works correctly 3. First create the table using navigation bar and then create another table using the form at db_structure and db_operations - This popups couple of dialog boxes (two or three) with a dialog with the entered table name (1 in image )and others with the empty name(2 in image). (as shown in the scenario 3 in the doc [1]). 4. First create the table using the forms and then create another table using the link at the navigation bar - After submitting the create_table_form at the dialog it shows that the required fields are empty.
I tried many ways to find what is the problem with this, but could not solve. Is there any special place where I can submit the current changes as a patch to you, so you can check it.
[1] - https://docs.google.com/document/d/1nf11ta4TXvG53JOmb7xANIB0GT7v9Rj8GdbAH_IC...
https://docs.google.com/document/d/1nf11ta4TXvG53JOmb7xANIB0GT7v9Rj8GdbAH_ICz7I/edit?hl=en&authkey=CM_izoME#Please help me on this issue.
Regards, Thilanka.
Thilanka Kaushalya a écrit :
Hi Marc,
I worked with create table dialog and currently faced with some problems with it. I rewrote the table_create click event in the navigation.js and it popups the dialog correctly with the form. Then for the form submit and increase the number of fields withing the dialog, I used same code which was at the functions.js. Currently following scenarios are working as follows.
- Create a table using the link at navigation bar - works correctly
- Create a table using the form at the db_structure and db_operations - works correctly
- First create the table using navigation bar and then create another table using the form at db_structure and db_operations - This popups couple of dialog boxes (two or three) with a dialog with the entered table name (1 in image )and others with the empty name(2 in image). (as shown in the scenario 3 in the doc [1]).
- First create the table using the forms and then create another table using the link at the navigation bar - After submitting the create_table_form at the dialog it shows that the required fields are empty.
I tried many ways to find what is the problem with this, but could not solve. Is there any special place where I can submit the current changes as a patch to you, so you can check it.
[1]
https://docs.google.com/document/d/1nf11ta4TXvG53JOmb7xANIB0GT7v9Rj8GdbAH_ICz7I/edit?hl=en&authkey=CM_izoME#Please help me on this issue.
Regards, Thilanka.
Hi Thilanka, I am following your repository (master branch) via the mechanism listed in [2]; I believe this is the best place to put your code, even if there are problems with it.
This way, me or anyone in the community can potentially help you.
[2] http://wiki.phpmyadmin.net/pma/Git#Merging_remote_branches
Hi Marc,
Hi Thilanka,
I am following your repository (master branch) via the mechanism listed in [2]; I believe this is the best place to put your code, even if there are problems with it.
This way, me or anyone in the community can potentially help you.
[2] http://wiki.phpmyadmin.net/pma/Git#Merging_remote_branches
I tried to push my changes to the repo using the fillowing command. git push thilanka but this gives following set of errors *thilanka@thilanka-Vostro-1520:~/Documents/phpMyAdmin/phpmyadmin-gsoc$ git push thilanka* * Counting objects: 35, done.* * Delta compression using up to 2 threads.* * Compressing objects: 100% (23/23), done.* * Writing objects: 100% (23/23), 3.79 KiB, done.* * Total 23 (delta 18), reused 0 (delta 0)* * error: unable to create temporary sha1 filename ./objects/93: File exists * * * * fatal: failed to write object* * error: unpack failed: unpacker exited with error code* * To ssh://repo.or.cz/srv/git/phpmyadmin/thilanka.git* * ! [remote rejected] master -> master (n/a (unpacker error))* * error: failed to push some refs to 'ssh:// repo.or.cz/srv/git/phpmyadmin/thilanka.git'*
Why is this happens. please help me on this issue.
[1] - http://repo.or.cz/w/phpmyadmin/thilanka.git
Regards, Thilanka.
Le 2011-05-20 13:26, Thilanka Kaushalya a écrit :
Hi Marc, I tried to push my changes to the repo using the fillowing command. git push thilanka but this gives following set of errors *thilanka@thilanka-Vostro-1520:~/Documents/phpMyAdmin/phpmyadmin-gsoc$ git push thilanka*
- Counting objects: 35, done.*
- Delta compression using up to 2 threads.*
- Compressing objects: 100% (23/23), done.*
- Writing objects: 100% (23/23), 3.79 KiB, done.*
- Total 23 (delta 18), reused 0 (delta 0)*
- error: unable to create temporary sha1 filename ./objects/93: File exists
- fatal: failed to write object*
- error: unpack failed: unpacker exited with error code*
- To ssh://repo.or.cz/srv/git/phpmyadmin/thilanka.git*
- ! [remote rejected] master -> master (n/a (unpacker error))*
- error: failed to push some refs to 'ssh://
repo.or.cz/srv/git/phpmyadmin/thilanka.git'*
Why is this happens. please help me on this issue.
[1] - http://repo.or.cz/w/phpmyadmin/thilanka.git
Regards, Thilanka.
Thilanka, Assuming you have checked out your branch in your repository, try this: git push
Hi Marc,
Thilanka,
Assuming you have checked out your branch in your repository, try this: git push
Thank you and now it is working.
I pushed the changes I have done up to now. with this commit [1].
Can you check for the issues I have mentioned earlier and shown in this doc [2] .
1. First create the table using navigation bar and then create another table using the form at db_structure and db_operations - This popups couple of dialog boxes (two or three) with a dialog with the entered table name (1 in image )and others with the empty name(2 in image). (as shown in the scenario 3 in the doc [1]). 2. First create the table using the forms and then create another table using the link at the navigation bar - After submitting the create_table_form at the dialog it shows that the required fields are empty.
In these changes I have just used direct strings as follows. * title: 'Create Table'* I need to add it to *PMA_messages{}* function but I cannot find the place where I can include the messages.php file to navigation.php. How can I include it.
Please help me on these issues.
[1] - http://repo.or.cz/w/phpmyadmin/thilanka.git/commit/0598d99925efdda3983656a6b... [2] - https://docs.google.com/document/d/1nf11ta4TXvG53JOmb7xANIB0GT7v9Rj8GdbAH_IC...
Regards, Thilanka.
Le 2011-05-21 07:27, Thilanka Kaushalya a écrit :
Hi Marc,
Thilanka,
Assuming you have checked out your branch in your repository, try this: git push
Thank you and now it is working.
I pushed the changes I have done up to now. with this commit [1].
Can you check for the issues I have mentioned earlier and shown in this doc [2] .
- First create the table using navigation bar and then create another
table using the form at db_structure and db_operations - This popups couple of dialog boxes (two or three) with a dialog with the entered table name (1 in image )and others with the empty name(2 in image). (as shown in the scenario 3 in the doc [1]). 2. First create the table using the forms and then create another table using the link at the navigation bar - After submitting the create_table_form at the dialog it shows that the required fields are empty.
In these changes I have just used direct strings as follows.
title: 'Create Table'*
I need to add it to *PMA_messages{}* function but I cannot find the place where I can include the messages.php file to navigation.php. How can I include it.
Please help me on these issues.
[1] - http://repo.or.cz/w/phpmyadmin/thilanka.git/commit/0598d99925efdda3983656a6b... [2] - https://docs.google.com/document/d/1nf11ta4TXvG53JOmb7xANIB0GT7v9Rj8GdbAH_IC...
Hi Thilanka,
First, are you using Firebug to debug this? In Firebug with Firefox 4 I can see that at my first attempt to create a table from the navi panel, there is a js error in the Ajax logic of jQuery. Maybe using a "get" this way with jQuery is not supported.
I made a suggestion in this thread, about running jQuery in the context of another frame. For an example, look at the last line of js/server_privileges.js.
Other points:
- to simplify the code, instead of selecting $('#newtable') and then looking for the ajax class on the a element, you could put the ajax class directly on the newtable id and select $('#newtable.ajax')
- watch your indentations (for example in navigation.php)
- you are creating the div id="create_table_dialog" in the "if" and also in the "else" so its creation should be moved before the "if"
- in navigation.php, try calling js/messages.php after calling js/functions.js
- when creating js variables, use var; for example, instead of url = $('#newtable a').attr("href"); var url = $('#newtable a').attr("href");
this way, the variable appears in Firebug and is easier to follow
Hi Marc,
First, are you using Firebug to debug this? In Firebug with Firefox 4 I can see that at my first attempt to create a table from the navi panel, there is a js error in the Ajax logic of jQuery. Maybe using a "get" this way with jQuery is not supported.
I'm using firebug but I didn't noticed that error message. I'll try to correct that.
I made a suggestion in this thread, about running jQuery in the context of another frame. For an example, look at the last line of js/server_privileges.js.
Other points:
- to simplify the code, instead of selecting $('#newtable') and then
looking for the ajax class on the a element, you could put the ajax class directly on the newtable id and select $('#newtable.ajax')
watch your indentations (for example in navigation.php)
you are creating the div id="create_table_dialog" in the "if" and also
in the "else" so its creation should be moved before the "if"
- in navigation.php, try calling js/messages.php after calling
js/functions.js
- when creating js variables, use var; for example, instead of
url = $('#newtable a').attr("href"); var url = $('#newtable a').attr("href");
this way, the variable appears in Firebug and is easier to follow
Thank for the above tips you pointed out. I'll work on that and correct them.
Regards, Thilanka.
Hi Marc,
I fixed the issues which were in my last commit of adding a dialog for "Create table" option in navigation panel. I updated the repository[1]. Please can you check that.
If it is okay I can start working on my second task which is "Implement the *Add a new user in database privileges task*".
[1] - http://repo.or.cz/w/phpmyadmin/thilanka.git
Regards, Thilanka.
Thilanka Kaushalya a écrit :
Hi Marc,
I fixed the issues which were in my last commit of adding a dialog for "Create table" option in navigation panel. I updated the repository[1]. Please can you check that.
If it is okay I can start working on my second task which is "Implement the *Add a new user in database privileges task*".
[1] - http://repo.or.cz/w/phpmyadmin/thilanka.git
Regards, Thilanka.
Thilanka, by the way I notice that you have not updated your repository with the latest changes in origin/master; please do it regularly and in particular when you feel that one of your tasks is completed, to ensure that the code blends correctly with other changes.
I'll look at your commit in a few hours.
Thilanka Kaushalya a écrit :
Hi Marc,
I fixed the issues which were in my last commit of adding a dialog for "Create table" option in navigation panel. I updated the repository[1]. Please can you check that.
If it is okay I can start working on my second task which is "Implement the *Add a new user in database privileges task*".
Hi Thilanka, the feature works well (at least in my tests).
Could you change one thing about the js variable names? By convention, adding a $ prefix is only for jQuery objects. In your code, "$url" should be "url" because it does not refer to the jQuery object but to an attribute of it.
Also, replace <script src="js/messages.php"></script> with <script type="text/javascript" src="js/messages.php"></script>
Another thing: you copied chunks of code from js/functions.js into js/navigation.js. This means maintainability problems for the future.
Can you refactor this code into a function which would be in functions.js and called from both places (table creation in navigation panel and table creation in main panel)?
You can keep your solution of "$div"; when I complained to you about the duplication of $('<div id="create_table_dialog"></div>') I had not noticed that this code was present in js/functions.js.
Hi Marc,
I did following changes and committed to the repository.
Could you change one thing about the js variable names? By convention, adding a $ prefix is only for jQuery objects. In your code, "$url" should be "url" because it does not refer to the jQuery object but to an attribute of it.
Modified the variable names in navigation.js file.
Also, replace
<script src="js/messages.php"></script>
with
<script type="text/javascript" src="js/messages.php"></script>
Modified the navigation.php file.
Another thing: you copied chunks of code from js/functions.js into js/navigation.js. This means maintainability problems for the future.
Can you refactor this code into a function which would be in functions.js and called from both places (table creation in navigation panel and table creation in main panel)?
Added the code to PMA_createTableDialog function in function.js file.
Please check the repository. I'll write a blog post on the task by tomorrow. Thank you.
Regards, Thilanka.
Thilanka Kaushalya a écrit :
Hi Marc,
I did following changes and committed to the repository.
Could you change one thing about the js variable names? By convention, adding a $ prefix is only for jQuery objects. In your code, "$url" should be "url" because it does not refer to the jQuery object but to an attribute of it.
Modified the variable names in navigation.js file.
Also, replace <script src="js/messages.php"></script> with <script type="text/javascript" src="js/messages.php"></script>
Modified the navigation.php file.
Another thing: you copied chunks of code from js/functions.js into js/navigation.js. This means maintainability problems for the future. Can you refactor this code into a function which would be in functions.js and called from both places (table creation in navigation panel and table creation in main panel)?
Added the code to PMA_createTableDialog function in function.js file.
Please check the repository. I'll write a blog post on the task by tomorrow. Thank you.
Regards, Thilanka.
Thilanka, it looks fine and is almost ready to be merged to origin/master!
I just saw something else that needs improvement. When using the new "Create table" button, we get a dialog with room for just one column. And the dialog to add columns, which needs to be used unless the table has only one column (not likely), is not in sight at this point.
I suggest moving the "Add x column(s) ... Go" dialog on top of the panel, next to the table name input field. This will at the same time clarify the interface because seeing Save Or Add X column(s) Go
is cluttered and unclear.
HI Marc,
Thanks for the suggestions you have made.
I just saw something else that needs improvement. When using the new "Create table" button, we get a dialog with room for just one column. And the dialog to add columns, which needs to be used unless the table has only one column (not likely), is not in sight at this point.
If I change the parameter "num_fields=1" to "num_fields=" it will initially gives two columns and then user can add more. Is that a preferable way to overcome this.
I suggest moving the "Add x column(s) ... Go" dialog on top of the
panel, next to the table name input field. This will at the same time clarify the interface because seeing Save Or Add X column(s) Go
is cluttered and unclear.
I also agree with you and currently "Add x column(s) Go" button is
confusing. I can make changes to the Create table form so it will affect at both "ajax enabled" and "ajax disabled" situations, or else I can change this only in my jquery dialog so it in the "ajax enabled" situations only. So what is preferable. I'll try on that and let you know the changes as soon as possible.
Regards, Thilanka.
Thilanka Kaushalya a écrit :
HI Marc,
Thanks for the suggestions you have made.
I just saw something else that needs improvement. When using the new "Create table" button, we get a dialog with room for just one column. And the dialog to add columns, which needs to be used unless the table has only one column (not likely), is not in sight at this point.
If I change the parameter "num_fields=1" to "num_fields=" it will initially gives two columns and then user can add more. Is that a preferable way to overcome this.
It's a good idea to change this parameter.
I suggest moving the "Add x column(s) ... Go" dialog on top of the panel, next to the table name input field. This will at the same time clarify the interface because seeing Save Or Add X column(s) Go is cluttered and unclear.
I also agree with you and currently "Add x column(s) Go" button is confusing. I can make changes to the Create table form so it will affect at both "ajax enabled" and "ajax disabled" situations, or else I can change this only in my jquery dialog so it in the "ajax enabled" situations only. So what is preferable. I'll try on that and let you know the changes as soon as possible.
It's preferable to change both as it's confusing in both situations.
Hi Marc,
I did following changes to the create table option in PMA and pushed it to the repo.
1. Changed the number of columns in the create table option in to default value which is 2 2. Changed the position of the Add "x" columns Go to the top of the form.
But in the 2nd option I removed the <fieldset> tag out of the column and just added them to a <td> in the table. Since the tables are vertically aligned to top (valign="top") the text and the input boxes are not aligned well within the option. So should I change the css properties of this. Please check the changes.
Regards, Thilanka.
Thilanka Kaushalya a écrit :
Hi Marc,
I did following changes to the create table option in PMA and pushed it to the repo.
- Changed the number of columns in the create table option in to default value which is 2
- Changed the position of the Add "x" columns Go to the top of the form.
But in the 2nd option I removed the <fieldset> tag out of the column and just added them to a <td> in the table. Since the tables are vertically aligned to top (valign="top") the text and the input boxes are not aligned well within the option. So should I change the css properties of this. Please check the changes.
Hi Thilanka, changes look fine!
About the alignment, I'm not sure if something needs to be done. Elsewhere on the interface, I see the same alignment. For example, - the Create table dialog in the right panel - in table structure, the Add x column(s)
Marc Delisle a écrit :
Thilanka Kaushalya a écrit :
Hi Marc,
I did following changes to the create table option in PMA and pushed it to the repo.
- Changed the number of columns in the create table option in to default value which is 2
- Changed the position of the Add "x" columns Go to the top of the form.
But in the 2nd option I removed the <fieldset> tag out of the column and just added them to a <td> in the table. Since the tables are vertically aligned to top (valign="top") the text and the input boxes are not aligned well within the option. So should I change the css properties of this. Please check the changes.
Hi Thilanka, changes look fine!
About the alignment, I'm not sure if something needs to be done. Elsewhere on the interface, I see the same alignment. For example,
- the Create table dialog in the right panel
- in table structure, the Add x column(s)
Feature pushed to origin/master.
Hi Marc,
I wrote a blog post on my first task [1].
[1] - http://coders-view.blogspot.com/2011/05/ajaxify-phpmyadmin-interface-gsoc-20...
Regards, Thilanka.