Hi, jquery.js 1.4.2 (minified) is now in the /js directory. I converted the slider effect. I am learning jQuery and am pleased so far, but I have two issues with the changes I did:
* under MSIE 8, there is no "+" and "-" appearing in front of the link
* in the Search page, animation is jumpy (could be related to [0])
Next job I'll do will be the color picker.
[0] http://blog.pengoworks.com/index.cfm/2009/4/21/Fixing-jQuerys-slideDown-effe...
Hi Marc,
do you know jQuery UI (http://jqueryui.com/)?
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
I converted the slider effect. I am learning jQuery and am pleased so far, but I have two issues with the changes I did:
- under MSIE 8, there is no "+" and "-" appearing in front of the link
Perhaps the widget 'Accordion' or the UI Plugin 'Toggleboxes' (http://plugins.jquery.com/project/ui-togglebox) may be a good solution for this.
- in the Search page, animation is jumpy (could be related to [0])
Please see above.
Next job I'll do will be the color picker.
Please take a look at http://acko.net/dev/farbtastic this a jQuery ready solution.
[0] http://blog.pengoworks.com/index.cfm/2009/4/21/Fixing-jQuerys-slideDown-effe...
Michael Keck a écrit :
Hi Marc,
do you know jQuery UI (http://jqueryui.com/)?
No, I have a jQuery book and I'm studying jQuery. Is jQuery UI popular and stable?
Do you use it?
My mind was set to replace Mootools with jQuery + jQuery plugins.
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
I converted the slider effect. I am learning jQuery and am pleased so far, but I have two issues with the changes I did:
- under MSIE 8, there is no "+" and "-" appearing in front of the link
Perhaps the widget 'Accordion' or the UI Plugin 'Toggleboxes' (http://plugins.jquery.com/project/ui-togglebox) may be a good solution for this.
I'll have a look.
- in the Search page, animation is jumpy (could be related to [0])
Please see above.
Next job I'll do will be the color picker.
Please take a look at http://acko.net/dev/farbtastic this a jQuery ready solution.
Yes I saw this one and other color pickers. I like their circle interface.
[0] http://blog.pengoworks.com/index.cfm/2009/4/21/Fixing-jQuerys-slideDown-effe...
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Am 21.03.2010 19:28, schrieb Marc Delisle:
Michael Keck a écrit :
Hi Marc,
do you know jQuery UI (http://jqueryui.com/)?
No, I have a jQuery book and I'm studying jQuery. Is jQuery UI popular and stable?
Of course ...
Do you use it?
YES! And I love It ;)
My mind was set to replace Mootools with jQuery + jQuery plugins.
Okay: jQuery + jQuery UI + some plugins
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
I converted the slider effect. I am learning jQuery and am pleased so far, but I have two issues with the changes I did:
- under MSIE 8, there is no "+" and "-" appearing in front of the link
Perhaps the widget 'Accordion' or the UI Plugin 'Toggleboxes' (http://plugins.jquery.com/project/ui-togglebox) may be a good solution for this.
I'll have a look.
- in the Search page, animation is jumpy (could be related to [0])
Please see above.
Next job I'll do will be the color picker.
Please take a look at http://acko.net/dev/farbtastic this a jQuery ready solution.
Yes I saw this one and other color pickers. I like their circle interface.
It's the same wich is used on jqueryui.com/themeroller
[0] http://blog.pengoworks.com/index.cfm/2009/4/21/Fixing-jQuerys-slideDown-effe...
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Michael Keck a écrit :
Hi Marc,
do you know jQuery UI (http://jqueryui.com/)?
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
Good point, especially if we add some jQuery plug-ins. Are you suggesting /js/jquery or just /jquery ?
Am 21.03.2010 19:29, schrieb Marc Delisle:
Michael Keck a écrit :
Hi Marc,
do you know jQuery UI (http://jqueryui.com/)?
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
Good point, especially if we add some jQuery plug-ins. Are you suggesting /js/jquery or just /jquery ?
js/jquery would good and perhabs we should in js/ add a php library wich loads all needed jquery scripts. So we need only to add <script src="/js/jquery.php"></script>
this is sample file list for jquery.php:
$files = array ( 'swfobject.js', // flash objects for uploading and copy to clippboard 'jquery.js', // core jQuery 'jquery-browser.js', // browser sniffer #'jquery-context.js', // context menus #'jquery-cookies.js', // cookie handler #'jquery-form.js', // form controll and validation 'jquery-hotkeys.js', // accesskeys 'jquery-imagemap.js', // imagemap for charts #'jquery-print.js', // jQuery print function 'jquery-ui.js', // jQuery UI Core 'jquery-ui-plugins.js', // jQuery UI Plugins 'jquery-ui-grid.js', // jQuery UI Table Grid (made by me) 'jquery-ui-upload.js' // jQuery UI Uploading (made by me) );
Hi,
It might be good if it loads only plugins which are used at the moment.
Regards, Tomas
On Sun, Mar 21, 2010 at 8:28 PM, Michael Keck sfnet@michaelkeck.de wrote:
Am 21.03.2010 19:29, schrieb Marc Delisle:
Michael Keck a écrit :
Hi Marc,
do you know jQuery UI (http://jqueryui.com/)?
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
Good point, especially if we add some jQuery plug-ins. Are you suggesting /js/jquery or just /jquery ?
js/jquery would good and perhabs we should in js/ add a php library wich loads all needed jquery scripts. So we need only to add <script src="/js/jquery.php"></script>
this is sample file list for jquery.php:
$files = array ( 'swfobject.js', // flash objects for uploading and copy to clippboard 'jquery.js', // core jQuery 'jquery-browser.js', // browser sniffer #'jquery-context.js', // context menus #'jquery-cookies.js', // cookie handler #'jquery-form.js', // form controll and validation 'jquery-hotkeys.js', // accesskeys 'jquery-imagemap.js', // imagemap for charts #'jquery-print.js', // jQuery print function 'jquery-ui.js', // jQuery UI Core 'jquery-ui-plugins.js', // jQuery UI Plugins 'jquery-ui-grid.js', // jQuery UI Table Grid (made by me) 'jquery-ui-upload.js' // jQuery UI Uploading (made by me) );
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi,
On 22 March 2010 01:02, Tomas Srnka tomas.srnka@gmail.com wrote:
Hi, It might be good if it loads only plugins which are used at the moment.
In that case, we can load jquery.js, jQueryUI core on all pages, and write a php function that will take an array as a parameter, and load the plugins and UI components listed in the array, for that page. jquery.js and jQueryUI core are required for all plugins and UI components respectively, so it would be good to have them loaded on all pages, when the browser supports JavaScript. We could store a cookie client side for javascript support maybe?
@Marc: jQuery UI is very stable and is popular. :) What if we implement the entire tabs setup (browse, structure, sql, and all the other tabs) by using the jQueryUI tabs, now that we are looking at using AJAX in the pma interface? The first time a particular tab is opened, we could use AJAX to load the content of the tab, and cache the content on the client side. Second time, if we open that tab, the content comes up faster. If the user wants an updated version of the content, then we can provide a refresh page which will reload the content on that tab. The jQueryUI tab setup is very simple (infact, too simple), and the above idea of loading tabs via AJAX is something I've tried at another place, it works pretty well.
Ninad S. Pundalik http://twitter.com/ni_nad http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Hi
Dne Mon, 22 Mar 2010 01:50:13 +0530 Ninad Pundalik ninadsp16289@gmail.com napsal(a):
Hi,
On 22 March 2010 01:02, Tomas Srnka tomas.srnka@gmail.com wrote:
Hi, It might be good if it loads only plugins which are used at the moment.
In that case, we can load jquery.js, jQueryUI core on all pages, and write a php function that will take an array as a parameter, and load the plugins and UI components listed in the array, for that page. jquery.js and jQueryUI core are required for all plugins and UI components respectively, so it would be good to have them loaded on all pages, when the browser supports JavaScript. We could store a cookie client side for javascript support maybe?
I think it's better to have either one file with all javascript or separate js files for each functionality. Otherwise you really loose advantage of caching in browser.
@Marc: jQuery UI is very stable and is popular. :) What if we implement the entire tabs setup (browse, structure, sql, and all the other tabs) by using the jQueryUI tabs, now that we are looking at using AJAX in the pma interface? The first time a particular tab is opened, we could use AJAX to load the content of the tab, and cache the content on the client side. Second time, if we open that tab, the content comes up faster. If the user wants an updated version of the content, then we can provide a refresh page which will reload the content on that tab. The jQueryUI tab setup is very simple (infact, too simple), and the above idea of loading tabs via AJAX is something I've tried at another place, it works pretty well.
Would the tabs still work without js?
Hi,
On 22 March 2010 01:02, Tomas Srnka tomas.srnka@gmail.com wrote:
I think it's better to have either one file with all javascript or separate js files for each functionality. Otherwise you really loose advantage of caching in browser.
You might know this better, I've never worked on sites where caching matters so much. I'm just a beginner :).
Would the tabs still work without js?
I completely forgot about this. Without js, the tabs degrade to a <ul> with the tab titles and a set of divs containing the content. We might have to check before processing the page itself, whether javascript support exists, maybe at the login page itself, and set a session variable or store a cookie. This might lead to hacks though, to give similar user experiences with and without js, so I guess we should try this out on a page and decide if it's worth taking up.
Ninad S. Pundalik http://twitter.com/ni_nad http://ninadpundalik.co.cc/blog GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C69
Hi
Dne Tue, 23 Mar 2010 10:27:47 +0530 Ninad Pundalik ninadsp16289@gmail.com napsal(a):
I completely forgot about this. Without js, the tabs degrade to a
<ul> with the tab titles and a set of divs containing the content. We might have to check before processing the page itself, whether javascript support exists, maybe at the login page itself, and set a session variable or store a cookie. This might lead to hacks though, to give similar user experiences with and without js, so I guess we should try this out on a page and decide if it's worth taking up.
Well the HTML should contain <ul> with links (just as it contains currently) and javascript should turn that into jQuery tabs. No server side checking is needed here.
Michael Keck a écrit :
Am 21.03.2010 19:29, schrieb Marc Delisle:
Michael Keck a écrit :
Hi Marc,
do you know jQuery UI (http://jqueryui.com/)?
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
Good point, especially if we add some jQuery plug-ins. Are you suggesting /js/jquery or just /jquery ?
js/jquery would good and perhabs we should in js/ add a php library wich loads all needed jquery scripts. So we need only to add <script src="/js/jquery.php"></script>
In library/common.inc.php we are using $GLOBALS['js_include'] which is filled by all other scripts that need to load some js; are you proposing to stop using this mechanism?
Hi Marc,
Am 22.03.2010 21:52, schrieb Marc Delisle:
js/jquery would good and perhabs we should in js/ add a php library wich loads all needed jquery scripts. So we need only to add <script src="/js/jquery.php"></script>
In library/common.inc.php we are using $GLOBALS['js_include'] which is filled by all other scripts that need to load some js; are you proposing to stop using this mechanism?
My idea is to improve performance. The common.inc.php is a really large file with many functions and checks, wich are not needed all times. My opion is: perhabs it would be easier to manage and improve performance if we use for sending javascript (and perhabs in future stylesheets too) a extra parser.
Michael
Michael Keck a écrit :
Hi Marc,
Am 22.03.2010 21:52, schrieb Marc Delisle:
js/jquery would good and perhabs we should in js/ add a php library wich loads all needed jquery scripts. So we need only to add <script src="/js/jquery.php"></script>
In library/common.inc.php we are using $GLOBALS['js_include'] which is filled by all other scripts that need to load some js; are you proposing to stop using this mechanism?
My idea is to improve performance. The common.inc.php is a really large file with many functions and checks, wich are not needed all times. My opion is: perhabs it would be easier to manage and improve performance if we use for sending javascript (and perhabs in future stylesheets too) a extra parser.
Michael
In Rasmus Lerdorf's presentations, he showed benchmarks that proove that (in general), what slows down the application is the *number* of include files (whose opening require a system call), as PHP parsing is quite optimized.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
2010/3/23 Marc Delisle marc@infomarc.info:
Michael Keck a écrit :
Hi Marc,
Am 22.03.2010 21:52, schrieb Marc Delisle:
js/jquery would good and perhabs we should in js/ add a php library wich loads all needed jquery scripts. So we need only to add <script src="/js/jquery.php"></script>
In library/common.inc.php we are using $GLOBALS['js_include'] which is filled by all other scripts that need to load some js; are you proposing to stop using this mechanism?
My idea is to improve performance. The common.inc.php is a really large file with many functions and checks, wich are not needed all times. My opion is: perhabs it would be easier to manage and improve performance if we use for sending javascript (and perhabs in future stylesheets too) a extra parser.
Michael
In Rasmus Lerdorf's presentations, he showed benchmarks that proove that (in general), what slows down the application is the *number* of include files (whose opening require a system call), as PHP parsing is quite optimized.
I think he said that a big amount of once_required/include, causes the delays (because of the extra system call). Using include/require is no problem, but then you need to manage your includes yourself (only once, for the entire codebase).
Greets,
Dieter
-- Marc Delisle http://infomarc.info
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Dieter Adriaenssens a écrit :
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (MingW32) Comment: Use GnuPG with Firefox : http://getfiregpg.org (Version: 0.7.10)
iEYEARECAAYFAkuo0hsACgkQZGJbiPqZM6NfjwCfRUYnqaPf40ZaZnpyGXJ0PYDh 6cwAnjXaua8485n4l8b5KFoC9ZQcpz0K =D2GX -----END PGP SIGNATURE-----
2010/3/23 Marc Delisle marc@infomarc.info:
Michael Keck a écrit :
Hi Marc,
Am 22.03.2010 21:52, schrieb Marc Delisle:
js/jquery would good and perhabs we should in js/ add a php library wich loads all needed jquery scripts. So we need only to add <script src="/js/jquery.php"></script>
In library/common.inc.php we are using $GLOBALS['js_include'] which is filled by all other scripts that need to load some js; are you proposing to stop using this mechanism?
My idea is to improve performance. The common.inc.php is a really large file with many functions and checks, wich are not needed all times. My opion is: perhabs it would be easier to manage and improve performance if we use for sending javascript (and perhabs in future stylesheets too) a extra parser.
Michael
In Rasmus Lerdorf's presentations, he showed benchmarks that proove that (in general), what slows down the application is the *number* of include files (whose opening require a system call), as PHP parsing is quite optimized.
I think he said that a big amount of once_required/include, causes the delays (because of the extra system call). Using include/require is no problem, but then you need to manage your includes yourself (only once, for the entire codebase).
In fact, in this slide http://talks.php.net/show/ygatech4/7 he says "A final optimization is to get rid of an include file"; we would have to measure the exact impact of removing just one include in phpMyAdmin but there must be some.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
2010/3/23 Marc Delisle :
Dieter Adriaenssens a écrit :
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (MingW32) Comment: Use GnuPG with Firefox : http://getfiregpg.org (Version: 0.7.10)
iEYEARECAAYFAkuo0hsACgkQZGJbiPqZM6NfjwCfRUYnqaPf40ZaZnpyGXJ0PYDh 6cwAnjXaua8485n4l8b5KFoC9ZQcpz0K =D2GX -----END PGP SIGNATURE-----
2010/3/23 Marc Delisle :
Michael Keck a écrit :
Hi Marc,
Am 22.03.2010 21:52, schrieb Marc Delisle:
js/jquery would good and perhabs we should in js/ add a php library wich loads all
needed jquery
scripts. So we need only to add
In library/common.inc.php we are using $GLOBALS['js_include'] which is filled by all other scripts that need to load some js; are you proposing to stop using this mechanism?
My idea is to improve performance. The common.inc.php is a really large file with many functions and checks, wich are not needed all times. My opion is: perhabs it would be easier to manage and improve performance if we use for sending javascript (and perhabs in future stylesheets too) a extra parser.
Michael
In Rasmus Lerdorf's presentations, he showed benchmarks that proove that (in general), what slows down the application is the *number* of include files (whose opening require a system call), as PHP parsing is quite optimized.
I think he said that a big amount of once_required/include, causes the delays (because of the extra system call). Using include/require is no problem, but then you need to manage your includes yourself (only once, for the entire codebase).
In fact, in this slide http://talks.php.net/show/ygatech4/7 he says "A final optimization is to get rid of an include file"; we would have to measure the exact impact of removing just one include in phpMyAdmin but there must be some.
Interesting stuff, I only read the blogpost you posted earlier. Of course, you can't get rid of all included files, a project would be very difficult to browse when everything is in one file. ;) I wonder if the size of the included files matters? Does a huge included file load faster than two smaller ones?
Greetings,
Dieter
Dieter Adriaenssens a écrit :
Interesting stuff, I only read the blogpost you posted earlier. Of course, you can't get rid of all included files, a project would be very difficult to browse when everything is in one file. ;) I wonder if the size of the included files matters? Does a huge included file load faster than two smaller ones?
Greetings,
Dieter
In his example, the include file he wanted to remove had only 8 lines. So I would guess that a huge file loads faster than two smaller ones. Of course we also want to avoid code duplication, this is why we use include files.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi
Dne Tue, 23 Mar 2010 16:30:48 +0100 Dieter Adriaenssens dieter.adriaenssens@gmail.com napsal(a):
Interesting stuff, I only read the blogpost you posted earlier. Of course, you can't get rid of all included files, a project would be very difficult to browse when everything is in one file. ;) I wonder if the size of the included files matters? Does a huge included file load faster than two smaller ones?
Usually yes, but the size matters somehow [*]. For example you can look at Adminer http://www.adminer.org/ which is really fast and is distributed as single PHP file. The development is of course done in separate files, but on release they are merged into one (at least this is how I understood authors presentatio, I did not find time to look at technical details).
[*] All this heavily depends on using of some PHP cache, state of file system caches, etc.
- -- Michal Čihař | http://cihar.com | http://blog.cihar.com
Hi
Dne Sun, 21 Mar 2010 18:27:47 +0100 Michael Keck sfnet@michaelkeck.de napsal(a):
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
I think there is not much code which does not use frameworks at all and everything should be converted. So I don't see reason separating jquery based code from other js.
Am 22.03.2010 11:24, schrieb Michal Čihař:
Hi
Dne Sun, 21 Mar 2010 18:27:47 +0100 Michael Keck sfnet@michaelkeck.de napsal(a):
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
I think there is not much code which does not use frameworks at all and everything should be converted. So I don't see reason separating jquery based code from other js.
Isn't good a solution to put jquery into /js/jquery/? Of course, there are many plugins wich I've need for the template based version. Other point: upgrading to newer version / updates / patches only for jquery can be automated.
Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi
Dne Mon, 22 Mar 2010 11:46:08 +0100 Michael Keck sfnet@michaelkeck.de napsal(a):
Isn't good a solution to put jquery into /js/jquery/? Of course, there are many plugins wich I've need for the template based version. Other point: upgrading to newer version / updates / patches only for jquery can be automated.
Maybe I understood the original intention wrong - you want to put upstream jquery stuff into this directory, or all javascript which uses jquery? The first of course makes sense and I was disputing the second (though I have now no idea whether you wanted it this way).
Michal Čihař a écrit :
Hi
Dne Mon, 22 Mar 2010 11:46:08 +0100 Michael Keck sfnet@michaelkeck.de napsal(a):
Isn't good a solution to put jquery into /js/jquery/? Of course, there are many plugins wich I've need for the template based version. Other point: upgrading to newer version / updates / patches only for jquery can be automated.
Maybe I understood the original intention wrong - you want to put upstream jquery stuff into this directory, or all javascript which uses jquery? The first of course makes sense and I was disputing the second (though I have now no idea whether you wanted it this way).
It was not my intention to put there all our js stuff that calls jQuery, only upstream stuff. Anyway we will (probably) have many calls inside PHP scripts.
Hi
Dne Mon, 22 Mar 2010 20:46:42 -0400 Marc Delisle marc@infomarc.info napsal(a):
It was not my intention to put there all our js stuff that calls jQuery, only upstream stuff. Anyway we will (probably) have many calls inside PHP scripts.
Well the best approach is to have all js external - you can hook up on any events externally and there is no need to pollute HTML with inline javascript.
Michal Čihař a écrit :
Hi
Dne Mon, 22 Mar 2010 20:46:42 -0400 Marc Delisle marc@infomarc.info napsal(a):
It was not my intention to put there all our js stuff that calls jQuery, only upstream stuff. Anyway we will (probably) have many calls inside PHP scripts.
Well the best approach is to have all js external - you can hook up on any events externally and there is no need to pollute HTML with inline javascript.
Michal, how do you propose to handle the case when a condition in PHP triggers some document.write calls that add a functionality only available with js, like the color picker? See main.php in master.
Hi
Dne Fri, 26 Mar 2010 08:01:31 -0400 Marc Delisle marc@infomarc.info napsal(a):
how do you propose to handle the case when a condition in PHP triggers some document.write calls that add a functionality only available with js, like the color picker? See main.php in master.
In this case you can append to #li_select_theme in case it exists. Usually there is simple way to write condition in javascript [*] and it makes things much simpler (it avoids mixing up different languages in single file, what tends to be confusing).
The best reason for this is to separate used languages in separate files. With PHP you're already mixing up HTML and PHP what we would like to avoid through using templates. Adding JavaScript into this mixture just makes the code more confusing and harder to read.
[*] I'm quit customized to mootools so I can not provide example for jQuery, but I doubt it is hard.
Michal Čihař a écrit :
In this case you can append to #li_select_theme in case it exists. Usually there is simple way to write condition in javascript [*] and it makes things much simpler (it avoids mixing up different languages in single file, what tends to be confusing).
The best reason for this is to separate used languages in separate files. With PHP you're already mixing up HTML and PHP what we would like to avoid through using templates. Adding JavaScript into this mixture just makes the code more confusing and harder to read.
[*] I'm quit customized to mootools so I can not provide example for jQuery, but I doubt it is hard.
Indeed it's very easy in jQuery. Done for main.php,
Michal Čihař a écrit :
Hi
Dne Fri, 26 Mar 2010 08:01:31 -0400 Marc Delisle marc@infomarc.info napsal(a):
how do you propose to handle the case when a condition in PHP triggers some document.write calls that add a functionality only available with js, like the color picker? See main.php in master.
In this case you can append to #li_select_theme in case it exists. Usually there is simple way to write condition in javascript [*] and it makes things much simpler (it avoids mixing up different languages in single file, what tends to be confusing).
The best reason for this is to separate used languages in separate files. With PHP you're already mixing up HTML and PHP what we would like to avoid through using templates. Adding JavaScript into this mixture just makes the code more confusing and harder to read.
[*] I'm quit customized to mootools so I can not provide example for jQuery, but I doubt it is hard.
There are other places like in tbl_select.php where a PHP loop generates some js. Maybe it could be done via our js_include mechanism and renaming in .js.php but I'm not sure. Even if it works, I'm not sure about the caching.
Hi
Dne Sat, 27 Mar 2010 16:12:37 -0400 Marc Delisle marc@infomarc.info napsal(a):
There are other places like in tbl_select.php where a PHP loop generates some js. Maybe it could be done via our js_include mechanism and renaming in .js.php but I'm not sure. Even if it works, I'm not sure about the caching.
Well I'd prefer not to generate code at all. This all about accessing data we have in PHP from javascript. The cleanest way IMHO is to generate the data in form which can be consumed by javascript functions (be it javascript array or json). Then the generated part function would simply convert to:
bDisabled = jQuery.inArray(value, UnaryOperators);
Michal Čihař a écrit :
Hi
Dne Sun, 21 Mar 2010 18:27:47 +0100 Michael Keck sfnet@michaelkeck.de napsal(a):
Am 21.03.2010 12:48, schrieb Marc Delisle:
Hi, jquery.js 1.4.2 (minified) is now in the /js directory.
Is able to make a new directory jquery? Because it would be more pretty to differ normal javascript from js-frameworks.
I think there is not much code which does not use frameworks at all and everything should be converted. So I don't see reason separating jquery based code from other js.
One reason is that for everyone, it will be clear that phpMyAdmin/js/jquery contains jquery and related stuff.