I wrote a jQuery function that will replace the hide_them_all() and init_options() javascript functions used in Import/Export. I am wondering if this should go back in the PMA_pluginGetJavascript() function in plugin_interface.lib.php, into one of the .js files, or into a new .js file. I will probably also end up re-writing the match_file() function which is also declared in PMA_pluginGetJavascript().
Hi
Dne Tue, 25 May 2010 17:01:31 -0400 Lori Lee leelorik@gmail.com napsal(a):
I wrote a jQuery function that will replace the hide_them_all() and init_options() javascript functions used in Import/Export. I am wondering if this should go back in the PMA_pluginGetJavascript() function in plugin_interface.lib.php, into one of the .js files, or into a new .js file. I will probably also end up re-writing the match_file() function which is also declared in PMA_pluginGetJavascript().
As we want to get rid of inline javascript, it should probably go to some file in js/ directory. In this case probably in new file.
Hi Lori,
On 26/05/2010, Michal Čihař michal@cihar.com wrote:
Hi As we want to get rid of inline javascript, it should probably go to some file in js/ directory. In this case probably in new file.
-- Michal Čihař | http://cihar.com | http://blog.cihar.com
I agree with Michal. For my part, where I am planning to write jQuery functions, I'll put the common ones in either functions.js or common.js (the previous one seems to be included almost everywhere) and write page specific functions in a new file and put it in /js/. For example, all JavaScript code necessary for server_privileges.php is in server_privileges.js.
Hi
Dne Wed, 26 May 2010 17:03:55 +0530 Ninad Pundalik ninadsp16289@gmail.com napsal(a):
I agree with Michal. For my part, where I am planning to write jQuery functions, I'll put the common ones in either functions.js or common.js (the previous one seems to be included almost everywhere) and write page specific functions in a new file and put it in /js/. For example, all JavaScript code necessary for server_privileges.php is in server_privileges.js.
Generally the function which are used in lot of (or all) places should go to some common library, while the ones used just on few pages should be placed separately to get maximum of caching in browser but to avoid loading too much on every page.
Ok, thanks. I am going to put them in a separate file since they won't be used anywhere else.
On Wed, May 26, 2010 at 7:41 AM, Michal Čihař michal@cihar.com wrote:
Hi
Dne Wed, 26 May 2010 17:03:55 +0530 Ninad Pundalik ninadsp16289@gmail.com napsal(a):
I agree with Michal. For my part, where I am planning to write jQuery functions, I'll put the common ones in either functions.js or common.js (the previous one seems to be included almost everywhere) and write page specific functions in a new file and put it in /js/. For example, all JavaScript code necessary for server_privileges.php is in server_privileges.js.
Generally the function which are used in lot of (or all) places should go to some common library, while the ones used just on few pages should be placed separately to get maximum of caching in browser but to avoid loading too much on every page.
-- Michal Čihař | http://cihar.com | http://blog.cihar.com
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
On 26 May 2010 22:50, Lori Lee leelorik@gmail.com wrote:
Ok, thanks. I am going to put them in a separate file since they won't be used anywhere else.
I just realised yesterday, that js/common.js is used for JavaScript functions that are used in both the frames (navigation and content), while js/functions.js is used for common functions over different pages in the content frame.
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Dne Fri, 28 May 2010 15:16:55 +0530 Ninad Pundalik ninadsp16289@gmail.com napsal(a):
On 26 May 2010 22:50, Lori Lee leelorik@gmail.com wrote:
Ok, thanks. I am going to put them in a separate file since they won't be used anywhere else.
I just realised yesterday, that js/common.js is used for JavaScript functions that are used in both the frames (navigation and content), while js/functions.js is used for common functions over different pages in the content frame.
Well the organization of the javascript files is not perfect. It would probably make sense to move some functions around.
On 28 May 2010 15:19, Michal Čihař michal@cihar.com wrote:
Well the organization of the javascript files is not perfect. It would probably make sense to move some functions around.
Yes, I remember that you and Marc discussed this issue a few weeks ago when I was discussing my proposal on this list. :) I'm right now creating a list of functions that we already have in functions.js and common.js, which I can refactor by using jQuery instead of plain JavaScript. I am planning to post it to a pastebin when the power here is back, so everyone could have a look at it and tell me if I'm trying to bite more than I can chew. If I have enough time close to the end of GSoC, I'll help in re-organizing, or I'd be glad to help after the coding period for GSoC ends.
(Offtopic:) Is there a place simpler than a pastebin to post the list of functions? I'd be happy if anyone on the list could add to it. A Google Doc or a page on the phpMyAdmin wiki?
Ninad S. Pundalik Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Ninad Pundalik a écrit :
On 28 May 2010 15:19, Michal Čihař michal@cihar.com wrote:
Well the organization of the javascript files is not perfect. It would probably make sense to move some functions around.
Yes, I remember that you and Marc discussed this issue a few weeks ago when I was discussing my proposal on this list. :) I'm right now creating a list of functions that we already have in functions.js and common.js, which I can refactor by using jQuery instead of plain JavaScript. I am planning to post it to a pastebin when the power here is back, so everyone could have a look at it and tell me if I'm trying to bite more than I can chew. If I have enough time close to the end of GSoC, I'll help in re-organizing, or I'd be glad to help after the coding period for GSoC ends.
(Offtopic:) Is there a place simpler than a pastebin to post the list of functions? I'd be happy if anyone on the list could add to it. A Google Doc or a page on the phpMyAdmin wiki?
I suggest the phpMyAdmin wiki.