[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-04 Thread Dan G. Switzer, II
In my May 2 2007 11:21 post I mentioned a jQuery port of JSAN making it a plugin to jQuery. the code in that post is the entire contents of the file jqjsan.js which comes out to 1,116 bytes in an uncompressed state. The compressed jsPax is 1,654 bytes. But as you pointed out they are

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-04 Thread Christof Donat
Hi, A lot of people prefer to package up all the plug-ins they use on a site and then pack/minimize it into one file. This method can be really affective for plug-ins that are used as part of the core site theme. 1. When your pages have very different functionality, it is more efficient to

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-04 Thread traunic
how would jsPax accomplish: $(user).each(function(){ $.jsanUse('com.myapp.userClass'); com.myapp.userClass.doSomething(this); }); Where com.myapp.userClass.doSomething is passed the selected user? Would it have to be this? $using('com.myapp.userClass', function() {

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-04 Thread Christof Donat
Hi, how would jsPax accomplish: $(user).each(function(){ $.jsanUse('com.myapp.userClass'); com.myapp.userClass.doSomething(this); }); Where com.myapp.userClass.doSomething is passed the selected user? Would it have to be this? $using('com.myapp.userClass', function() {

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-03 Thread traunic
On May 3, 8:54 am, Christof Donat [EMAIL PROTECTED] wrote: variable names. You can e.g. do that by encouraging people to use Plugin names like java packages, e.g. org.jquery.ajax. Christof Exactly! And furthermore if you use a corresponding directory structure i.e. /jslib/org/jquery/ajax.js

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-03 Thread Christof Donat
Hi, variable names. You can e.g. do that by encouraging people to use Plugin names like java packages, e.g. org.jquery.ajax. Exactly! And furthermore if you use a corresponding directory structure i.e. /jslib/org/jquery/ajax.js then you should eliminate collisions right off the bat.

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-03 Thread Christof Donat
Hi, In my May 2 2007 11:21 post I mentioned a jQuery port of JSAN making it a plugin to jQuery. the code in that post is the entire contents of the file jqjsan.js which comes out to 1,116 bytes in an uncompressed state. The compressed jsPax is 1,654 bytes. But as you pointed out they are

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-02 Thread Christof Donat
Hi, Why not use OpenAjax? http://ejohn.org/blog/thoughts-on-openajax/ OK, I accept the legal stuff. I did not join that Alliance because I did not understand any of that. I have problems with legal texts in german - a foreign language doesn't make that better. The technical stuff:

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-02 Thread Christof Donat
Hi, Sorry, I just found a mistake in my solution code: jQuery.plugin = function(name) { var p = jQuery.plugins; var n = name.split('.'); for( var i = 0; i n.length; i++ ) { if( !p[n[i]] ) p[n[i]] = {}; p = p[n[i]]; }

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-05-01 Thread Jörn Zaefferer
Christof Donat schrieb: Hi, // Implementation: $.require = function(names) { $.each(names.split(,), function(i, n) { if( !$.fn[n] || $[n] ) throw required plugin + n + not found; }); } // Usage: $.require(autocomplete,dimensions);

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-04-30 Thread Alexandre Plennevaux
It seems like inevitable to me too, Dan. If for example, $.plugin.find([dimension,blockui,below]); fails, it would output a message Error: plugin plugin_name requires other_plugin_name. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dan G.

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-04-30 Thread Jörn Zaefferer
Dan G. Switzer, II schrieb: Guys, It occurred to me last night with the growing list of plug-ins and the fact that so many plug-ins now are dependant on other plug-ins, that we should try to add a couple of functions to the jQuery core for registering plug-ins and detecting if a plug-in has

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-04-30 Thread Dan G. Switzer, II
Brandon, I believe Yehuda has been working on something like Dan describes: http://dev.jquery.com/browser/branches/yehuda-dev/register.js I think I like what Jörn presents but not the name. It makes me think it would load the necessary files. Maybe $.required(). I was just thinking of

[jQuery] Re: An idea for a jQuery core addition - Plugin Registering...

2007-04-30 Thread Christof Donat
Hi, // Implementation: $.require = function(names) { $.each(names.split(,), function(i, n) { if( !$.fn[n] || $[n] ) throw required plugin + n + not found; }); } // Usage: $.require(autocomplete,dimensions); Why not use OpenAjax? If you