Le 2013-07-28 12:10, Bin Zu a écrit :
Hi guys,
I am refactoring the code about display import : libraries/display_import.lib.php
[Codes] one issue is to render HTML (including Javascript) at once on PHP. the old code: https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/display_impor... refactor code: https://github.com/xmujay/phpmyadmin/blob/2660fb048166b42381d4f0b6ae627f8f1a...
Hi Bin, by the way, in your refactored code, the function PMA_getHtmlForImportNoPlugin() should be renamed. It does not contain code for the situation when there is no plugin, but when there _is_ a plugin.
[Situation] One diffcult issue is : https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/display_impor... this line means, when the import finished, $GLOBALS['reload']= true, and the navigation panel will be refreshed.
This has for effect of reloading both navigation and main panel.
But now I render all JS on PHP. (It will be moved to seperated JS file on the future) the corresponding code : https://github.com/xmujay/phpmyadmin/blob/2660fb048166b42381d4f0b6ae627f8f1a...
[Question] my question is, where should I put the code "$GLOBALS['reload']", so that the navigation panel will be refreshed after import It is not woking after L568, since the HTML is not not rendered yet.
If you can do it at the js level, use this: PMA_reloadNavigation();
thanks Marc,
I have rename the function and fix the navigation reload issues.
here is the pull request: https://github.com/phpmyadmin/phpmyadmin/pull/542
other refactor: https://github.com/phpmyadmin/phpmyadmin/pull/549
thanks,
Bin