Re: [jQuery] Interface: Draggable Ghost should only show the border

2007-01-17 Thread Webunity | Gilles van den Hoven
I have to update my window plugin some time.. All those nice jQuery 
releases make my life so much easier!

Thanx you guys for activly devving this!!

Stefan Petre wrote:
 floepi wrote:
   
 Hi all,

 i was wondering how i can set my draggable options so that while dragging a
 copy of the element is made which shows only the border dimensions of it's
 parent element. 

 Gilles window plugin (http://gilles.jquery.com/window/) does that really
 nicely. 

 My problem is, that the modal divs i want to drag around contain a lot of
 data like forms and such. While dragging the browser update is really bad
 and i get this stutter effect, which makes the overall feel quite bad. 

 Hope somebody can give me a hint. 

 Cheers

 Phil


   
 
 Hi Phill,

 I change draggables so now you can drag only a frame by setting option 
 'frameClass' with the name for the frame's class. This will be released 
 at the end of the week.

 Stefan

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
   


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [jquery] what if the button wasn't there when the page loaded?

2007-01-13 Thread Webunity | Gilles van den Hoven

 $('#myButton').click(function() {
 $('#myTarget').load('myfile.html' function() {
 alert('my callback');
 });
 });

 The above says: when myButton is clicked, load myfile.html into
 myTarget and alert me when it's done.
   
And then you can rebind any event handlers you want, but do this only 
on the #myTarget, else the events get binded twice to the other elements 
allready binded.

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery selecting one row on link click

2007-01-08 Thread Webunity | Gilles van den Hoven
Or, don't add an ID;

(PSEUDO, UNTESTED CODE ALERT)

script type=text/javascript
jQuery(document).ready(function() {
jQuery(a).click(function() {
// Get all current highlighted rows, of THIS table.
objCurrent = jQuery(tr.highlight, 
jQuery(this).parents(table)[0]);

// Did we have a previous selection?
blnChanged = (objCurrent.length  0);

// Remove old clases
if (blnChanged) {
objCurrent.removeClass(highlight);
// .. ajax call to remove selection .. e.g. 
serialize it ??
}

// Select new row(s)
jQuery(this).parents(tr).addClass(highlight);
if (blnChanged) {
// .. ajax call here ..
}
}
});
/script


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery-modalContent Plugin 0.11 released

2007-01-04 Thread Webunity | Gilles van den Hoven
Gavin M. Roy wrote:
 I've released 0.11 of the jquery-modalContent plugin with the following 
 changes:
  
 2006-12-19 patch from Tim Saker [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
   1) Keyboard events are now only permitted on visible elements belonging to 
 the modal layer (child elements). Attempting to place focus on any other page 
 element will cause focus to be transferred back to the first (ordinal) 
 visible child element of the modal layer.

   2) The modal overlay shading now covers the entire height of the document 
 except for a small band at the bottom, which is the height of a scrollbar (a 
 separate thread to be opened on this problem with dimension.js).

   3) I removed the code that disables and reenables the scrollbars.  This is 
 just a suggestion really, realizing it could be one of those little things 
 that causes fellow developers to become unnecessary foes ;=).  Personally, I 
 found it an annoying behaviour to remove a visible scrollbar causing the page 
 elements to shift right upon modal popup, then back after closure. If the 
 intent was to prevent scrolling it doesn't anyway since you can still page 
 down with the keyboard. Maybe it should be a boolean option passed in the 
 function signature?

   
Nice work Gavin,

In my submodal plugin, (thesame functionality as your plugin, but 
extended with a content div), i also had to tackle points 2 and 3. 
Here's how i tackled those 2 points.

Set the width of the div to 100%, this covers the width part. Now comes 
the tricky part, the height. We have to make sure it covers the entire 
content below it. You can't just leave some space empty for a 
scrollbar, since some people have scrollbars that are 50px high (i hate 
those windows themes).

This means that it has to be as large as the document, except if the 
document is smaller then the viewport, then it has to be as high as the 
viewport. *You also have to take changes to the document into 
consideration.* And this is important. With this i mean that it could be 
possible that the div you show over the modal can grow in height, say 
with 600px. Then, if you'd scroll down you would see a lot of white space.

To tackle the height problem, i use this code, but you really only need 
the height part:
--[ snip ]--
// Get document size
var intDocumentWidth, intDocumentHeight;
var intPageWidth, intPageHeight;
if (document.documentElement  
document.documentElement.clientWidth) { // Explorer 6 Strict Mode
intDocumentWidth = document.documentElement.clientWidth;
intDocumentHeight = document.documentElement.clientHeight;
intPageWidth = document.documentElement.scrollWidth;
intPageHeight = document.documentElement.scrollHeight;
} else {
if (document.body) { // other Explorers
intDocumentWidth = document.body.clientWidth;
intDocumentHeight = document.body.clientHeight;
intPageWidth = document.body.scrollWidth;
intPageHeight = document.body.scrollHeight;
} else {
if (self.innerHeight) {// all except Explorer
intDocumentWidth = self.innerWidth;
intDocumentHeight = self.innerHeight;
}
}
}

// for small pages with total size less then width/height of the 
viewport
if (intPageWidth  intDocumentWidth) {
intPageWidth = intDocumentWidth;
}

if (intPageHeight  intDocumentHeight) {
intPageHeight = intDocumentHeight;
}
--[ snip ]--

Oke, that's that. Now put this into a function and call it. Make sure 
that function returns the pageheight. This way you can stretch the div 
to the bottom of the screen. So when i initialize my submodal, i set the 
correct size. When the document is scrolled, i update the size (height) 
again so i am sure it covers any changes made to the page (content 
added/removed/etc).

I hope i am helpfull with this.

Best of luck.

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery-modalContent Plugin 0.11 released

2007-01-04 Thread Webunity | Gilles van den Hoven

 Wow, lots of code... for my Thickbox adaption the following worked fine:

 html, body {
  min-height: 100%;
 }
 #yourDiv {
  height: 100%;
 }

 #yourDiv has to be a direct child of the body...
   
Ah, thanks. But what if i want to overlay an overlay?

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jquery-modalContent Plugin 0.11 released

2007-01-04 Thread Webunity | Gilles van den Hoven
smoore wrote:
 Giles, by any chance do you have an example of overlaying an overlay? I'd be
 interested in seeing how that worked.
   
It was just theoretical ;)


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Dvye.net Autocomplete issues - scrollbars in IE

2006-12-18 Thread gilles
 I'm having an odd issue with the Autocompleter in IE.

 http://www.dyve.net/jquery/?autocomplete

 When I type something into the search box, presto, I get long horizontal
 and
 vertical scrollbars. After I select an option from the dropdown list, the
 scrollbars go away.

It seems like a bgiframe issue, talk to the creator of this plugin so he
knows that this issue occurs ;)

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] NEWS: Meet The People Behind jQuery

2006-12-18 Thread gilles
 Some big changes have been going on in an effort to better organize the
 jQuery project as well improve the user experience and extend the
 project's visibility. John has done quite a bit of legwork and broken
 out the project team into dedicated groups that will help promote the
 effort on many different fronts.

This is nice and all, but i would also like to see a section with heavy
contributers like me, Klaus and so many others also ;)

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Possible bug in 1.0.4

2006-12-16 Thread Webunity | Gilles van den Hoven
Jörn Zaefferer wrote:
 I found a bug in 1.0.4;

 It has to do with this line:
 var c = this.events[event.type];

 In the handle function.

 The error occurs after cliking an ASP button which reloads the page.
 Unfortunately, i can't give a test page since it is a closed project.  All
 i can say is that it gives an error stating:
 this.events has no properties

 Maybe this one can be solved by adding this check?
 if (!this.events)
   return;

 However, i can't connect to SVN from here, so can someone pick this up?
 

 It seems like jQuery tries to handle an event that wasn't registered via 
 jQuery. Does that make any sense?

 --
 Jörn Zaefferer

 http://bassistance.de
   

Hi Jorn,

The thing is, it is not caused by any jQuery binding. It is caused when 
the page loads (and on that test page, i didn't have any jQuery commands 
in it). So nothing jQueryish is going on, only the include of the 
javascript 1.0.4 file. It also does not happen when the page first 
loads, only after pressing a button, then the page reloads, then the 
error fires. And again, i am absolutely 100% sure that there is no 
jQuery code in place yet. Seems like jQuery is trying to handle some 
basic events on its own?

-- Gilles

p.s. browser was ffx 1.5.0.4

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin: Mousehold

2006-12-16 Thread Webunity | Gilles van den Hoven
Andy Matthews wrote:
 This would be a perfect thing to meld in with that form scroller plugin.
 Can't recall who wrote it, but it converted a form field into a widget that
 let you click up and down to change values.
   
And is there a feature which counts how many events are fired?
I am thinking of an implementation where you first get increments of 1, 
then 2, then 4, then 8 (the longer you hold your mouse down)

Know what i mean?

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Possible bug in 1.0.4

2006-12-15 Thread gilles
Hi guys,

I found a bug in 1.0.4;

It has to do with this line:
var c = this.events[event.type];

In the handle function.

The error occurs after cliking an ASP button which reloads the page.
Unfortunately, i can't give a test page since it is a closed project.  All
i can say is that it gives an error stating:
this.events has no properties

Maybe this one can be solved by adding this check?
if (!this.events)
  return;

However, i can't connect to SVN from here, so can someone pick this up?

Thanx

Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] mirror of dean edwards packer anywhere?

2006-12-13 Thread Webunity | Gilles van den Hoven
Anybody know a mirror of dean edwards packer?
The .NET application doesn have thesame compression results.

Thanx

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] OT: mail delivery

2006-11-29 Thread Webunity | Gilles van den Hoven

 Does anyone know how good Thunderbird handles imap mailboxes with lots 
 of mails? I have nearly the complete mailing list in my imap mailbox 
 here (ca 15000 mails right now)...
   
I am not sure, but i've read there is a bug in the latest thunderbird, 
which occurs when you delete items and then compress the folder, your 
maildb gets garbled, so don't compress untill 1.5.0.9 is out!

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Suggestion for interface / sortables

2006-11-29 Thread gilles
 Hi,

 I love the interface plug-ins, but they lack the functionality to resort
 elements on load. In my case this mostly concerns the sortables.


What do you mean, that you want to print your HTML and sort the list
after it is build (using array/hash)? Why not add some business logic, and
make sure the list has the correct state when building it?

e.g. instead of this:
* item3
* item2
* item5
* item1
* item4

make sure it prints like this:
* item1
* item2
* item3
* item4
* item5

Making the sortable resort itself requires a custom function, since
everybody uses the sortables with different content.

Or maybe i don't understand what you mean.

-- Gilles



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Interface Selectable.. function on deselect

2006-11-29 Thread gilles
Hi Stefan,

Good one, i'll add this to the iSelectable core later on today.

There is one error in your code though:
 if (jQuery.selectedone == true  this.f.onselect) {
 this.f.onselect(jQuery.Selectserialize(jQuery.attr(this,'id')));
 } else {
 this.f.ondeselect();
 }


This should read:
 if (jQuery.selectedone == true  this.f.onselect) {
 this.f.onselect(jQuery.Selectserialize(jQuery.attr(this,'id')));
 } else if (this.f.ondeselect) {
 this.f.ondeselect();
 }


Or even this:
 if (jQuery.selectedone == true) {
if (this.f.onselect)
 this.f.onselect(jQuery.Selectserialize(jQuery.attr(this, 'id')));
else if (this.f.ondeselect)
 this.f.ondeselect();
 }


This depends on how the code is right now, but i can't see it from here.
The point is, you forgot to check if there is a ondeselect assigned.

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Stop using thickbox!

2006-11-28 Thread Webunity | Gilles van den Hoven
Dan Atkinson wrote:
 Going by the title, I fear that this is more wishful thinking and showmanship
 than anything else.
   
Hi Dan,

Correct. I wasn't trying to be arrogant, on the contrary, i just wanted 
to poke around to see how people reacted on my plugin. I've tried this 
before with the email is sent titled new plugin: Window, but i only 
received about 3 reactions on that, and i felt disapointed since i've 
put so much work in it, perfecting it (in my eyes). The mail with this 
title received some critisism, but also gave me some new ideas to work 
with, something i ran out of and that is all i ever wanted.

To be honest, the last time i looked at thickbox it was only capable of 
showing 1 image, and not (like it is now) capable of doing much more. :s 
(sigh!)

On your comment on degration, I am not sure my window plugin needs to 
degrade, after all, you have to open it from Javascript and it is a 
javascript build and controlled box... That's just my opinion, since i 
don't see how i could degrade this... It is either javascript on or off 
with this plugin.

I'm hoping to get the community's thoughts on how i can improve this 
dialog, so people can implement this on their own CMS/website whatever 
use they feel for it. I think the reason the dragging is kinda slow, is 
the entire discussion going on about the best way to create the 
draggables for interface, so i hope that get's solved pretty quick.

Since all i wanted to create (show off) with this plugin that it is 
possible to create a OS like dialog very easy (without those nasty popup 
blockers), maybe it's better to find a way to combine both plugins??

Anyway, i hope i didn't sound to arrogant, i was also a bit pissed on 
ajaxian.com constantly bragging on about ruby, prototype, scriptaculous, 
moo, YUI and forgetting all about jquery

Hoping on a response,

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Stop using thickbox!

2006-11-27 Thread gilles
Finally some reactions.

I did not mean to say My plugin is better or something like that, just
wanted to get your attention to my plugin, because, like said, i can't
perfect it without you guys.

Some points mentioned by you guys:
* I'll try go get a CSS layout online as soon as possible.
* Some people who are complaining that it relies on interface. I had to,
if i wanted this funcionality myself the code got twice as big at least!
So that is the why, i hope you can understand. Something called
reusability :)
* Please define slow i know it is slow, but this is only the draggable
part in IE6, i don't know what is wrong there, since i use the bgiframe
hack which everybody uses.
* Glen, i don't have IE7 yet, but i'll try to fix this as soon as i can.

 I realize there's a smiley on the end, but this really /is/ a joke, right?
 Your plugin frankly isn't anywhere near ready for public use, as much as I
 wish it were.

Su, like said, don't give such a comment without giving some solutions or
problem areas on my test enviroment, windows with IE6 and FF 1.5.0.8 it
works fine. I can't fix what i don't see as broken.

p.s. who's Quicken?

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Stop using thickbox!

2006-11-25 Thread Webunity | Gilles van den Hoven
And use my window plugin :)

Why?

Thickbox was made for images
Window plugin was made for popups (dialogs)

Just my $0.02

-- Gilles

http://gilles.jquery.com/window/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] new plugin: window (+DEMO)

2006-11-16 Thread gilles
 very nice plugin! I really like it.

Thanx!

No i didn't write iresizable myself, its the work of Stefan Petre ( part
of the interface plugins).

The outline window is actually an empty div which has thesame size. (The
div is part of iresizable, but i added my own styling to it.)

p.s. to the other one stating it didn't have select box support; you
didn't fully read my introduction mail :)

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] cssHover update

2006-11-15 Thread Webunity | Gilles van den Hoven
Hi Guys,

I forgot to add one fix to SVN, its comitted now.

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] new plugin: window (+DEMO)

2006-11-15 Thread Webunity | Gilles van den Hoven
Hi guys,

After i've done a lot (+8 weeks!) of work on the window class it's now 
ready to be released to the public for beta testing. I'm hoping to 
release this plugin at the same time jQuery 1.1 becomes available, but 
all bugs have to be squised off course.

The plugin makes use of my cssHover plugin ( 
http://gilles.jquery.com/cssHover/ ) and some of the plugins uit of the 
interface pack ( http://interface.eyecon.ro/ ). This way, i didn't have 
to rewrite code again. So thanks Stefan for your work on interface, it 
made this plugin possible.

There is a demo page online at my jQuery site: 
http://gilles.jquery.com/window/

Please be advised not yet to use this plugin, since it may contain bugs, 
even though i have tried to keep it to a minimum. The documentation is 
in the source code and below in this email.

Known issues:
- Not tested in IE7, Opera and Safari, but IE6 and FFX work
- The iframe hack isn't added yet, because that caused a massive 
performance drop in MSIE. Doesn't cover select boxes yet.
- There is currently only one theme available (XP Aqua), but there will 
be more before i release the plugin so you see how to make your own.
- Only one callbacks yet: onLoad, suggestions are welcome
- Unknown if it leaks in MSIE, if so, please advise where and i'll fix it

A few highlights:
- Fully themable, including active/non active state.
- Multiple dialogs on 1 page, automatic z-indexing
- Modal dialogs
- Minimize/maximize functionality
- Draggable/Resizable
- Windows behaviour: doubleclick titlebar to maximize or restore if 
minimized
- Stays in center if you say so, as long as the titlebar wasn't dragged.
- When maximized, the window remains in view when you scroll the page

Other than that, you can set a lot of options:
- Minimum size
- Maximum size
- Title bar width when minimized
- Use transfer effects (explode / implode)
- Initial state: minimized / normal / maximized
- Opacity
- Restricted to parent

Read the code for more ;)

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] SVN update: cssHover

2006-11-14 Thread Webunity | Gilles van den Hoven
I've updated cssHover with some new stuff, check out the discussion on 
this topic earlier in the mailinglist.

Basicly i added a new function, so you can use this.click() to toggle 
the state, and this.chSetState(true|false) to change the state. You 
can also use this.chSetState(true|false, TRUE) to force the change 
even on disabled items, since they normally don't get updated.

I also updated the css sprites so they now use 1 background image 
instead of each state their own.

I'll commit the changes tonight to SVN, if John fixes the SVN errors and 
Server errors.

The entire demo page will also be in SVN as a ZIP file.

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] cssHover

2006-11-14 Thread Webunity | Gilles van den Hoven
[EMAIL PROTECTED] wrote:
 Gilles,

 There is also a scenario where user checks few checkboxes then decides 
 to select all, the result is that the previously checked boxes toggle 
 back to un-checked. The select-all function only needs to toggle between 
 select all and select none.

 What do you think?
   
You are absolutely right.

I've done some more fixes on the cssHover, but the demo is now offline. 
Basicly i added a new function, so you can use this.click() to toggle 
the state, and this.chSetState(true|false) to change the state. You 
can also use this.chSetState(true|false, TRUE) to force the change, 
even on disabled items since they normally don't get updated.

I'll commit the changes tonight to SVN, if John fixes the SVN errors and 
Server errors.

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] cssHover and interface iresizable committed

2006-11-14 Thread Webunity | Gilles van den Hoven
Hi guys,

The changes to cssHover and interface iresizable are committed to SVN.
Also the demo page for cssHover is up again, showing the new features.

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] cssHover

2006-11-13 Thread Webunity | Gilles van den Hoven
[EMAIL PROTECTED] wrote:
 Gilles or anybody else with knowledge of the cssHover plugin:

 Can you please tell me how can I select all checkboxes in a form controlled 
 by cssHover with a select all click event?

   
You could use jQuery to find all checkboxes you want to toggle:
jQuery(some code to select some cssHover elements).each(function() {
this.chSetState(true);
});

Check the code for more documentation, or shout in here ;)

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] cssHover

2006-11-13 Thread Webunity | Gilles van den Hoven
[EMAIL PROTECTED] wrote:
 Gilles, thanks, I've noticed that you added the requested example at

 http://gilles.jquery.com/cssHover/

 Works for me now too.

 roso
   
Jep, just finished it.

As it now works, you can't change the state of a disabled cssHover item.

HTH,

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] A modal dialog box using greybox + form plugin

2006-11-08 Thread gilles

 Contrary to what I wrote earlier, it does work in Internet Explorer 6
 (you need to use the the latest jquery.js, not version 1.02

 I'm not sure how this could be refactored into something properly
 generic, let alone a plugin.

My window plugin is almost ready, it could do this very easily.

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] window plugin: update

2006-11-07 Thread Webunity | Gilles van den Hoven
Hi Guys,

You've probaly seen the Ajaxian post on the YUI dialog. Well i am happy 
to report that i've almost completed my plugin (after i released 
cssHover i did a complete rewrite) and it offers almost thesame 
functionality as the YUI version:
* Fully themable
* Fully customizable (e.g. isDraggable, isResizable, hasStatus, 
setContent, setContentURL, useIframe, Modal, Non-Modal etc. etc.)
* Callbacks: onOpen, onLoad
* Easy to use.

All you have to include are my cssHover class, the interface iDrag, 
iResizable and iUtil class and optionally the iFxTransfer class for nice 
animations.

Well, today i finished the dragging and resizing part, as well as the 
maximize/minimize buttons. This is all done. All whats left is add the 
support for multiple dialogs on 1 page (including switching from one 
dialog to another), some testing and it'll be released in the wild.

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] window plugin: update

2006-11-07 Thread Webunity | Gilles van den Hoven
Reynier Perez Mira wrote:
 Hi Gilles:
 Thanks a lot for this plugin but where I can download it and see 
 documentation in how to use in my site?
 Cheers
   
Not yet, it is 98% finished :)

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] window plugin: update

2006-11-07 Thread Webunity | Gilles van den Hoven
Dave Methvin wrote:
 * Callbacks: onOpen, onLoad
 

 Instead of callbacks, consider custom events. It easily allows for multiple
 subscribers to the event, and you can chain the query to bind the events. It
 also loosens the coupling between objects.
   
If you don't mind, i'll wait with that untill the first beta is out ;)

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Unsure about the usage of .parent()

2006-11-06 Thread gilles
Why does .parent() modify the original object? This isn't right according
to me.

Let's say i have this code:
testDOM = SOMEOBJECT.parent().parent()[0];

And i want to do some more work on the original object;
SOMEOBJECT.hide();

I get this error:
.. IS NOT A FUNCTION

I am unsure on how to correctly get the parent's parent without changing
the original object.

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE and the escape key triggering a hide action

2006-11-06 Thread Webunity | Gilles van den Hoven

 Ah, I got it. If you have an input/button of type reset, the escape 
 key triggers that action in IE...
   
Jep, funny huh?


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] jQuery window plugin (teaser)

2006-11-02 Thread gilles
Hi Everyone -

Just a teaser to show off my work i am doing on the window plugin:
http://img183.imageshack.us/img183/6139/windowao6.png

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Capture tab focus in dialog window

2006-11-02 Thread Webunity | Gilles van den Hoven




Klaus Hartl wrote:

  Hi all,

I thought I just share that:
  

-snip- long story -snip-

You can fix this very easily without doing all wierd stuffies like
changing tab index.
  $(document).focus(function(oEvent) {
return ((oElement = oEvent.srcElement || oEvent.target)
 jQuery(oElement).ancestors(YOURPARENTHERE).length);
  });

3-liner ;)

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] new plugin cssHover [ui checks, radio buttons and more!]

2006-10-30 Thread Webunity | Gilles van den Hoven
Hi guys, i've made a new plugin and added it to SVN. It is still in beta 
(== bugs) so don't use yet untill fully tested.

This plugin actually started out as a remake of the CRIR (Checkbox Radio 
Input Replacement) code found on the websites of Chris Erwin, Yeduha 
Kratz and Kawika.org. I wanted to make a version which used the power of 
jQuery to create thesame effects, but then a little bit better. When i 
finished my early draft code, it worked on both CHECKBOX and RADIO 
elements, and was 4.9kb in size (uncompressed). Right about then, i got 
the idea to combine my old jButton code (which used IMG tags and SRC 
attributes to create simple buttons) with this code, and code a solution 
which could be used to add a :hover class to almost any element. Well, 
here you have it; 17.3Kb in size, 4kb compressed and even smaller 
GZIP'd, an all-in-one solution to fix most of your problems.

Demo page:
http://gilles.jquery.com/cssHover/

Please test and let me know if there are any bugs. If not, i'll commit 
it to SVN.

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] new plugin cssHover [ui checks, radio buttons and more!]

2006-10-30 Thread Webunity | Gilles van den Hoven
Stefan Petre wrote:
 I have found a bug. When you click a checkbox the replaced image is not 
 the hovered instance.
   
That bug is fixed, however, it introduced a new bug which you probably 
won't see (i've to test this first ;))

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] new plugin cssHover [ui checks, radio buttons and more!]

2006-10-30 Thread Webunity | Gilles van den Hoven
Klaus Hartl wrote:
 Works fine in Safari 2.04. One little thing though: Safari is the only 
 browser I know that doesn't trigger a click or does not focus the 
 associated form element when clicking on the label. That always annoys me.
   
The code as is right now should trigger the click event on the element 
it is watching, e.g. you click the label, the label finds the for 
and triggers the click event, and thus also the toggle state. I use 
basic jQuery code for that, so that should work...

p.s. I am no CSS guru, but the flickering of the images could be solved 
by using 1 background image, and 8 states in that image (thus using 
background-position) if i am right...

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Visual jQuery Announcement

2006-10-28 Thread Gilles Vincent
Hmm, Opera too ?Oops' forget it, I'm using Opera 9.0 :(--2006/10/27, Gavin M. Roy [EMAIL PROTECTED]:
Nice :-) Any chance you're going to make it work with Safari in the future? Would probably be a good thing to have it support all of the same browsers jQuery itself supports. Keep up the good work, I use visualjquery often!
GavinOn Oct 26, 2006, at 4:23 PM, Yehuda Katz wrote:
I just updated Visual jQuery so it uses docs that include the plugins in the svn.I'm going to be adding inline docs to Interface over the next few days, so Interface docs will be available on 
 visualjquery.com in the next few days.If there's a plugin that you have in the svn repository, but it's not currently on Visual jQuery, please let me know whether I can add the inline docs into the repository, or if you want to do it. The more we get centralized documentation, the better the overall jQuery community becomes. 
-- Yehuda KatzWeb Developer | Wycats Designs(ph)718.877.1325___jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/ 
___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Enhanced jQuery Events Module

2006-10-27 Thread gilles
 I was saddened and chagrined to discover that the event system didn't
 have additional arbitrary arguments as I thought it did and so I wrote
 them in. I modified the event system very slightly to allow for both
 additional arguments and scope modification (two features of the Yahoo
 Event Utility I always thought were very useful when I developed with
 it). I have my typical level of documentation (read: as little as I can
 manage) at the demo page I set up ( http://jquery.offput.ca/event++/ ).
 It was a pretty simple rewrite and hopefully it will be of use to someone.

Hmm i don't know what chagrined means, but it probably means you weren't
very happy when you found out :p

This is some really really great code and i allready have my uses for
this. What i wonder is, can this code be integrated with the improved
events stystem which was written just a while ago?

Great work!


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Enhanced jQuery Events Module

2006-10-27 Thread gilles

 If you're asking about Jörn's oneclick(), click(fn,num) syntax I just
 added it into a non-public version and it works fine.
 Actually, that API change is delayed at least till 1.1. Therefore you
 should just ignore it and stick to your old code.

This means that, if i develop my plugins based upon the SVN repo, i have
the latest changes?


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] new plugin: unobtrusive CRIR (Checkbox And Radio Image Replacement)

2006-10-26 Thread gilles
So i've made yet another plugin. I prefer that this plugin will be a part
of Interface, since they are interface plugins. As for now i have it
working for Checkboxes in both FF 1.5.0.7 and MSIE 6.x, but i want to do
some more testing.

*What's new?*
I've made quite a few improvements upon the other implementations found on
this list, but the code is still very simple and easy to understand/use.

The checkbox/radio can have a lot of states;
- off: no mouse over
- off: mouse over
- off: mouse down
- on: no mouse over
- on: mouse over
- on: mouse down
- disabled: no mouse over

-- All will be automaticly styled using CSS.

*Demo?*
A demo URL will be up within a week. This plugin has a higher priority
then the window plugin. I know you guys are all waiting on the window
plugin, but i want to release this plugin, and maybe other UI widgets...

*Refactoring needed?*
Right now, all CSS classes for the above mentioned states must be defined,
but i am thinking about refactoring this technique into a new plugin for
which you can specify options, since we can also use this technique for
buttons and some other widgets.. If i decide to do this, a demo will be up
in 2 weeks or so...

*Screenshots!*
If you want to see how the end result CAN look, take a look at the Today
screen in Live Messenger and at the bottom there is a checkbox.
Or check this site: http://www.webunity.nl/upload/crir_demo.png

To be continued...

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Improved Event system new Accordion

2006-10-26 Thread gilles
 Hi folks,

 I just commited a few changes to jQuery's event system. I fixed the target
 property of the event.target for both IE and Safari, and modified bind: It
 now accepts an optional third parameter that specifies the number of times
 the handler has to executed. When that amount is reached, it removes the
 handler. All onexxx events like oneclick now use that option and
 potentiolly provide better performance.

Great! Going to test that tonight!

 By the way, is there interest to put the accordion into the jQuery
 repository?

If you create a subdirectory in SVN/plugins this would be really good.
Since Klaus and I also made an accordion plugin, we might need to change
that to /plugins/accordion1/ and /plugins/accordion2/.

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] triggering an event

2006-10-24 Thread Webunity | Gilles van den Hoven
Adam van den Hoven wrote:
 Can I force the click event to fire manually, or do I resort to
   
I think you can do this with the apply call, although i am unsure how ;)

P.s. nice surname ;)

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Is there a way to dynamically load jquery plugins

2006-10-23 Thread gilles
 I would like to be able to load my jquery plugins dynamically
 as this would reduce the number of scripts in my document head.

You could also combine all scripts you use on your entire site into 1
file, then, pack it and also don't forget to gzip it. There is a lot of
documentation on this on the net. I managed to get jQuery from 20k to 9k
when gzipped. I load this file using PHP which sets the correct headers
for all browsers.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] $(.my_input).focus() shouldnt work?

2006-10-23 Thread Webunity | Gilles van den Hoven
Rafael Santos wrote:
 hey guys, could u help me?

 this is my lines:
 $(#month).keypress( function(){
 len = $(this).val().length;
 if(len == 1){ document.getElementById(day).focus(); }
 });

 this firebug give me an error.

 if(len == 1){ $(#day).focus(); }

 this do nothing...

 what am i doing wrong
Please consult the website for more information, but in short you are 
doing 2 things wrong. First of all, you are using 
document.getElementById which can be shortened to $('#..') or 
jQuery('#..') and secondly you have to make sure that the element is 
focusable (e.g. not hidden, disabled or otherwise unfocusable).

Try this:

jQuery(#month).keypress(function() {
if (this.length == 1)
jQuery('#day')[0].focus();
});

[or]

$(#month).keypress(function() {
if (this.length == 1)
$('#day')[0].focus();
});

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Window Dialogues

2006-10-23 Thread gilles
 Anyone know of any good movable, expandable and minimzable window dialogs
 (like http://prototype-window.xilinus.com/index.html for Prototype)

I am allready working on that, it's about 70% ready. All i need is some
extra time to work on it :p

It is allready pretty big in filesize, but i wanted as much flexibility as
possible, meaning you can set: isDraggable, isResizable, hasTitlebar,
hasStatusbar etc.etc.

I think i can have a demo ready tomorrow late in the evening.

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Why do i need a delay in $(document).ready when using the center plugin ?

2006-10-23 Thread gilles
 Hello again,

 i'm using the center plugin to center images inside a div. But i have to
 call it with a timeout like this:

 $(document).ready(function(){
setTimeout(doCenter(),1000);
 });

 function doCenter(){
 $(.jqcenter).each(){
$(this).center();
 }
 }


If you DO want to use jQuery, you could use something like this;

$(document).ready(function() {
// Makes sure the image is centered no matter how often you change the
image src.
$(.jqcenter).load( function() { $(this).center();  } );
});

However, i am not sure if the onload tag for images is 100% supported.

-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Array.indexOf

2006-10-21 Thread Webunity | Gilles van den Hoven
I've seen that the clean function requires the Array.indexOf function, 
but this isn't available since Javascript 1.5. I am not sure on what 
javascript version jQuery is supposed to run on.

Can anybody clarify that?

If it is lowe then 1.5, we need to add the following snippet to 
jQuery.js to support older browsers:
-
[].indexOf || (Array.prototype.indexOf = function(v, n){
n = (n == null) ? 0 : n;
var m = this.length;
for (var i=n; im; i++)
if (this[i] == v)
return i;
return -1;
});
-

--Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] interface 3 bugs fixxed in SVN

2006-10-21 Thread Webunity | Gilles van den Hoven
Hey guys,

/Bug squashing time!/

When doing some pre-work for a project i want to start on, i found out 
that the interface library still had some minor bugs. I've mailed 
allready mailed them to Stefan, but he is very busy with a project right 
now, he doesn't even respond to my mail anymore :p (or he is on vacation) :p

Anyway, since interface was in SVN, i took the opportunity to squash the 
bugs myself.

*The first bug: idrag.js*
I noticed i couldn't destroy the draggable once it was created. I 
commented out the old code, and put in the new code. This way you can 
see what i did.

*The second and third bug: iselect.js*
I found out that selecting was inconsistent. You had different behaviour 
when not using CTRL, or if you are using CTRL. This is how it now works:
- When the dragging starts, an array of ID's is created with the current 
selected items. This was crucial in finding out which items where 
previously selected.
- When you mouseover an image, it checks to see if this item was 
selected (when you started dragging), if so, unselect it, else mark it;
- If an item was selected, but it was not selected when you started 
dragging, and you remove the selection box from it (e.g. unhover) 
deselect it;
- But RESELECT the object, if we are using CTRL  we dragged over an 
item which was selected while we started the drag (so it got 
unselected), but while still holding CTRL, we moved away from it. 
Meaning you didn't want to unselect it.
- When the selection stops, the currentSelection array is emptied.

All in all quite some work to get it right, but as far as i can see it 
behaves now like the windows explorer selection style...

*Note on changes to iutil.js:*
The new functionality REQUIRES Array.indexOf (see previous message), if 
you don't have it, a fallback code was implemented in iutil.js. I 
thought this was the best place for it.

-- Gilles




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New Plugin: Resizeable

2006-10-21 Thread Webunity | Gilles van den Hoven
Stefan Petre wrote:
 After a wild period at my work, I managed to make some time to develop a 
 new plugin.

 Resizeable: allow elements to resize by handlers to north, east, west 
 etc direction, set minimum width/height/ maximum width/height. minimum 
 top/left/ maximum right/bottom.
   
YES

Exactly what i needed for my jQuery window plugin!

I LOVE YOU STEFAN!

P.s. i am working a flash image replacement plugin, will be ready today!


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] new plugin: SIFR (Flash Image Replacement)

2006-10-21 Thread Webunity | Gilles van den Hoven
Hi guys,

http://gilles.jquery.com/sifr/

enjoy ;)

It is not yet in SVN, because the original creator is working on version 
3.0 while this code is based upon his 2.0 version.

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Improved jQIR?

2006-10-20 Thread gilles
Hi Faust,

Nice work! I suggest however that you change order of the parameters to
path format. This is more logic.


 I have only tested this with Firefox 1.5 and IE 6.  ppk warned that IE
 on Windows does /not/ fire the |onload| event of cached images.  I did
 not notice any problems when returning to pages via the back button with
 IE.

This problem can easily be tackled for MSIE. You could (if
(jQuery.browser.msie) ...) add a random number to ensure the image from
loading. See my code at the bottom.

I am not sure you're code doesn't leak mem in IE. I've been reading so
much about this that i am a bit lost in the event binding stuff..

Here is my version:

jQuery.fn.jQIR = function(format, path) {
var template = document.createElement('img');
return this.each( function() {
var obj = jQuery(this);

// Prevent caching
var url = path + obj.id() + '.' + format;
if (jQuery.browser.msie) {
url+= '?' + (Math.round(512 * Math.random()) + 
Math.round(512 *
Math.random()));
}

// Change image
jQuery(template.cloneNode(true)).oneload( function() {
obj.empty().append(this);
}).attr( { src: url, alt: obj.text() } );
obj = null;
});
};

Basicly all i added was the random hack, cleaned up the code a bit, and
added the obj = null;. Didn't test it cause i am at work now.

HTH,

Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] jQuery image gallery

2006-10-13 Thread Webunity | Gilles van den Hoven
from: 
http://ajaxian.com/archives/jquery-image-gallery-transitions-thumbnails-reflections


jQuery Image Gallery: Transitions, thumbnails, reflections

http://ajaxian.com/archives/jquery-image-gallery-transitions-thumbnails-reflections

Ramin B. has put together yet another image gallery 
http://www.getintothis.com/blog/2006/10/12/image-gallery-using-jquery-interface-reflections/.
 
This time it is using jQuery as the library, and has a bunch of rich 
effects such as transitions, reflections, and the use of thumbnails.

It looks pretty close to the Flickr Flash widget.

Check out the Demo Page http://getintothis.com/pub/projects/gallery/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Intfac Sotabls estion

2006-10-12 Thread Webunity | Gilles van den Hoven
Nathan Smith wrote:
 http://host.sonspring.com/dragdrop/

Hi Nathan!

Change your javascript code to this and try again!

$(document).ready(
function () {
// Save options
hshOptions = {
accept: 'sortableitem',
activeclass: 'background',
hoverclass: 'background',
helperclass: 'placeholder',
opacity: 0.6,
fx:200,
revert:true,
tolerance: 'pointer'
}

// Create first sortable, with above options
$('ul#sort1').Sortable(hshOptions);
   
// Create second sortable, with above options, but with 
containment on
hshOptions.containment = 'parent';
$('ul#sort2').Sortable(hshOptions);
}
);

p.s. you could also create 2 hashes for the options, but since you reuse 
almost all options this seemed the best choice.

Good luck,
Gilles!

p.s. check the docs at: http://interface.eyecon.ro/docs/sort

for more options

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Error in latest svn jquery.js (427)

2006-10-11 Thread Webunity | Gilles van den Hoven
Paul Bakaus wrote:
 noticed the same,  going to look at it.
p.s. it is allready patched ;)

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] How to implement file upload using AJAX?

2006-10-11 Thread Webunity | Gilles van den Hoven
File upload is not possible using JavaScript for security reasons.
There have allready been a lot of people asking this on this list.

-- Gilles
/If you'd Googled, you'd know/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Best way for storing user preferences?

2006-10-11 Thread Webunity | Gilles van den Hoven
Raffael Luthiger wrote:
 3) Every time the page is loaded the js-script asks the server for a XML 
 (or JSON) file with the preferences in there.
   
Option 3, but save the data you got from the server in a cookie, which 
you destroy after 1 day or something like that. Each time the user 
changes the div, a new cookie is set and data is send back to the 
server. This saves you half in traffic and is the best solution if you 
ask me.

Gilles

p.s. there is a jQuery cookie plugin :p

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] typeof color == array in interface/highlight.js

2006-10-10 Thread Webunity | Gilles van den Hoven
Eckhard Rotte wrote:
 Hi there,

 there seems to be a bug in the interface/highlight.js plugin.
 Setting the color option as an array doesn't work because the array detection
   
Hi Eckhard, good catch!

I fixed this in my SVN version, but do you have a test page, so i can 
test the fix before i commit something?

Thanx

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Form plugin: default method

2006-10-10 Thread Webunity | Gilles van den Hoven
Sam Collett wrote:
 Is it the default on all browsers? If so, then perhaps that would be a
 good idea.
   
I agree with Klaus, all resources i found point that GET is the default 
method.

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] $document.ready NOT broken

2006-10-10 Thread Webunity | Gilles van den Hoven
Seems like the problem lies in another place, not in the document.ready 
part..
Going to investigate this further

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE7 and document.ready

2006-10-10 Thread Webunity | Gilles van den Hoven
Mike Alsup wrote:
 Can you post a test page because that sure doesn't happen for me.

 Mike
   
I've tracked down the problem to IE7 in standalone mode. I am almost 
certain that that is the problem. It sometimes just keeps hanging on (1 
item remaining) and thus not firing the $(document).ready() part.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] typeof color == array in interface/highlight.js

2006-10-10 Thread Webunity | Gilles van den Hoven
Hi Eckhard,

I've commited my fix to SVN, can you get the new ifxhighlight.js from 
SVN and test that with your page?

Thanx

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] typeof color == array in interface/highlight.js

2006-10-10 Thread Webunity | Gilles van den Hoven

 Yep, works.

 Theres some debug code left:
 
 .constructor==Array
 
   
Good catch, totally missed that one ;)

Anyway, the new (fixxed) version is in SVN

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE6 performance tweak

2006-10-09 Thread Webunity | Gilles van den Hoven
Klaus Hartl wrote:
 The by far safest thing to use is Conditional Compilation. And that way 
 other browsers only get JavaScript comments...:
   
Yeah i saw that on your blog. But doesn't this affect all versions of 
msie, even 6+ ?

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE7 May be Pushed out Tomorrow

2006-10-09 Thread Webunity | Gilles van den Hoven
Rey Bango wrote:
 If you don't want to upgrade, be very vigilant about what automatic 
 updates you install during MS' normal patch cycle:
   
Does anybody know if it is possible to run both IE 6.x and IE7 both on 
thesame system? An absolute must if you are a web developer...

Thanx

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE7 May be Pushed out Tomorrow

2006-10-09 Thread Webunity | Gilles van den Hoven

 Try this: http://tredosoft.com/IE7_standalone
 Works good enough for me.
   
Thanx, just downloaded it!


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] IE7 and document.ready

2006-10-09 Thread Webunity | Gilles van den Hoven




Hi Guys,

Just found another document.ready bug at least i hope it is a bug :)

The document.ready is not firing in IE7 when loading content via ajax
into a DIV. Is this a common problem which is allready known? Someone
might have a fix for this?

The current scenario fires succesfully in both firefox and IE6 just
like i want it to be and is like this:
- I load some _javascript_s in the header of the page, in those headers
are document.readys
- When i load new data into a div, i want the document.readys to fire
again, since they do some jQuery magic

As said, this scenario successfully works in both Firefox 1.5.0.2 and
IE6, just like i want it to do, but fails in IE7.

Hope someone can help me.

Gilles



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jQuery 1.0.2 RC2

2006-10-08 Thread Webunity | Gilles van den Hoven
Jörn Zaefferer wrote:
 Hi folks,

 it's time for another release candiate, this time including even more 
 bug fixes and nothing else.
   
Hi Jorn,

Why don't you commit these into SVN, or did you? It is a bit confusing 
if we have 2 releases for jQuery, especially for newbies

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE6 performance tweak

2006-10-08 Thread Webunity | Gilles van den Hoven
This somehow improves the performance of IE6. Interesting object detection
 as well. Opinions on this method?
 
Hi,

This hack was allready posted to this list by me, and someone told us 
you could use jQuery's method of detecting MSIE before applying the hack,

Something like this, in my base.js file.
// Object initializatie
$(document).ready(function() {
// Fix background image caching problem
if (jQuery.browser.msie) {
try { document.execCommand(BackgroundImageCache, false, true); 
} catch(err) {}
}
});

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Fast form serializer function for review

2006-10-03 Thread Webunity | Gilles van den Hoven
Mat,

This code:

 if (t == 'select-multiple') {
 $('option', this).each( function() {
 if (this.selected)
 a.push({name: n, value: this.value ||
 $(this).text()});
 });
 return;
 }

Can be changed to this, if i am right ;)

 if (t == 'select-multiple') {
 $('[EMAIL PROTECTED]selected]', this).each( function() {
 a.push({name: n, value: this.value || $(this).text()});
 });
 return;
 }

Other then that,

Great code!

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Fast form serializer function for review

2006-10-03 Thread Webunity | Gilles van den Hoven
Mike Alsup wrote:
 Or better yet:

 $('option:selected')...
   
Hey Mike, is that supported by jQuery? If i am right, only a plugin adds 
that method of selecting..
-- Gilles


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Bug in fx?

2006-10-03 Thread Webunity | Gilles van den Hoven
When using idrag.js and a created drag with fx:100 for instance,
the current jQuery SVN bails on line 3938 with the error:
*z.e.curAnim has no properties*

This is the line:
z.el.curAnim[ prop ] = true;

The lines:
if (z.el.curAnim)
z.el.curAnim[ prop ] = true;

work, but i don't know if that is the correct way to do so.

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Started on window class for jQuery

2006-10-03 Thread Webunity | Gilles van den Hoven
Hi Guys,

I have decided to share my subModal class. I started this lightbox of 
me right after i saw the first lightbox for prototype (so i have been 
coding on this one for almost 1 year now). It is going to have a lot of 
features and will off-course be shared with you guys. At the current 
state it basicly is thesame as all other ones out there, but that is 
going to change. I'll start coding on it tomorrow and hope to show 
something in a couple (3-4) of weeks.

-- Gilles

p.s. the window class will be using code from Stefan Petre's interface 
pack, especially for the drag code and effects.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Rev: 259, where is now?

2006-10-03 Thread Webunity | Gilles van den Hoven
Andrea Ercolino wrote:
 I don't know how I got Rev: 259, because current latest is 249. I 
 wandered around but I cannot find a link to it in jquery.com.
Each time someone of the developers (like me) commit something, the 
version number is increased. Therefore since your last download, 10 
commitments where done, leaving you at 259. The exact size of each 
commitment is very different. One time it is only 1 small bug, the other 
time it is a bigger list of bugs.

HTH, GIlles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Evaluating script elements

2006-10-03 Thread Webunity | Gilles van den Hoven

 any ideas?
   
maybe evaluate()?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] DD's got a problem

2006-09-30 Thread Webunity | Gilles van den Hoven
Use this code instead:

$(document).ready(function() {
$('#foo').find('dd').hide().end().find('dt').click(function() {
$(this).find('dd').each(function() {
if ($(this).is(':visible')) {
$(this).slideUp();
} else {
$(this).slideDown();
}
});
});
});

As you see in your own code, you are only toggling the next() element, 
which is the first after the DT, thus the first DD.

Hope this helps, and btw, it could even be in less code, but maybe some other 
peeps could help you with that.

-- Gilles



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] jButton released!

2006-09-28 Thread Webunity | Gilles van den Hoven
abba bryant wrote:
 mind fixing the demo link so we don't all have to look at a 403 page?
   
As i posted in another thread, the jButton code is now located at:
http://gilles.jquery.com/jButton/

Sorry for the 403's!

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] jButton released!

2006-09-27 Thread Webunity | Gilles van den Hoven
Hello guys!

I just finished my new plugin and would like to receive some feedback! I 
wrote a new plugin which can transform an image into a button.

Features include:
* Toggle button or a default button
* You can provide a function or string as the action to take when the 
button is clicked. In case of a function, the function gets called. In 
case of a string, the button is wrapped by an href tag and the link is 
called.
* In case of a toggle button, you can preset the state it is in.
* The option to create 2 different styles of buttons. You can either 
create default IMG buttons (which swappes a preloaded image and uses 3 
seperate images) or you can use CSS style swapping, which uses 1 image 
as background, and the backgroundPosition property.

You can check out the demo here:
http://www.webunity.nl/_test/jquery/jButton/

Waiting for your feedback!!

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] mousewheel plugin

2006-09-26 Thread Webunity | Gilles van den Hoven
Mathias Bank wrote:
 It seems, that mousewheel is not an accepted event in jquery. So I
 have written a small plugin that can handle wheel events. It is based
 on http://adomas.org/javascript-mouse-wheel/. 
Nice! I just sent an email about the exact same page to John today (3 
hours ago), telling him we need Mousewheel support!
I think however that you cp'd much of the code there, and i think a lot 
of the code could be removed since it is allready in the jQuery core.

I hope that John gives his reaction to this!

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] No more IE6 background-flicker!!!

2006-09-26 Thread Webunity | Gilles van den Hoven
Hi guys,

I've seen this interesting post on the Ajaxian forum today:
http://ajaxian.com/archives/no-more-ie6-background-flicker
http://misterpixel.blogspot.com/2006/08/title-well-its-done-my-ie6-background.html

Which gives me this jQuery implemention, which i have added to my base 
jQuery init code!
$(document).ready(function() {
// Fix background image caching problem
if (jQuery.browser.msie) {
try { document.execCommand(BackgroundImageCache, false, true); 
} catch(err) {}
}
};

I hate to tell you this, but it works :)

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] proposal for help fighting comment spams on Trac

2006-09-21 Thread Gilles Vincent
Comment spams are the worst to manage in Trac. I've written two small shell scripts which enable to detect comment spams and clear them easily.Here are these scripts ::~$ cat ./check_comments.sh #!/bin/bash
echo select * from ticket_change where time in (select time from ticket_change where newvalue like '%http:%'); | ./sqlite3 trac/$1/db/trac.db:~$ cat ./erase_bad_comments.sh #!/bin/bash# auteur: Gilles Vincent : 
[EMAIL PROTECTED]# simple comment spam cleaner v.1.0# works on http://trac.rezo.net/trac/spip# It's based on keywords that can be found in spams
# The keywords can be detected with the complementary script :check_comments nbargs=$#if [ $nbargs -lt 2 ]thenecho simple comment spam cleaner v.1.0echo  It's based on keywords that can be found in spams
echo (take care to choose you keywords cautiously)echo parameters : $0 tracName [motCle1] [motcle2] [motcle3] ...echo 'tracName' ismandatory : use 'spip' or 'spip-zone'  or 'test' ...
elsefor x in $*doif [ $x != $1 ]thenecho delete from ticket_change where time in (select time from ticket_change where newvalue like '%$x%'); | ./sqlite3 trac/$1/db/trac.db
fidonefi--This script must be adapted to your configuration :For spip, every projects are stored under a unique root : trac/The first parameter indicates the directory name of this project
It's certainly possible to clear spams automatically with some keywords (Vi*gr* etc..)Personnaly, a daily report is sent to me with crontab, and in our case  ( we are not as famous as jquery ;)  it's enought.
-Hope it helps !.GillesPS.: I've implemented also a simple solution to fight ticket spams. Does it interess you ?PPS.: have you upgraded to Trac1.0 ? There is an antispam plugin which looks quite good : 
http://trac.edgewall.org/wiki/SpamFilter
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Fader code I duplicated using JQuery

2006-09-21 Thread Webunity | Gilles van den Hoven
Rey Bango wrote:
 I saw this posting:

 http://mikeomatic.net/techtips/css-crossfader/

 and it showed a really cool fader. So I duplicated it using JQuery:

 http://www.intoajax.com/fade.htm

 The cool thing is that I didn't need to load scriptaculous to do it.
   
Nice stuff! I was wondering how much effort it would be with jQuery 
since i need this on a new project of me ;)

Thanx

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] jQuery::PeriodicalUpdater ?

2006-09-21 Thread Webunity | Gilles van den Hoven
Anybody did a periodical updater plugin like the scriptaculous one?

I hope all plugin developers put there plugin on: http://jquery.com/plugins/

Thanx

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] subModal (was: ThickBox - closing without using the mouse?)

2006-09-13 Thread gilles
 This had been added in 2.1, which was retracted because it had too many
 issues.

I suggest you don't put your suggestion in the code! Basicly you unbind
all keypress events assigned to the document, even the ones assigned
before loading the thickbox.

*You can take a look at the keypress part from my code to see how i fixxed
this. Maybe we can combine forces to create a super script*

-
my SubModal script:
-
I also made a thickbox implementation for jQuery, however it is almost
finished for over 5 months :) Never released it though. Therefore i am
starting a new thread for this. I don't have an example page and i am
currently at holiday in Turkey, but it has a lot of features allready
(except the iframe part).

Anyway:
Currently, the overlay is at 100% pageheight, or the height of the content
if the content is +100%. When the content dynamicly changes, e.g. grows, i
have to adjust the overlay accordingly.

p.s. this source is build by me, based upon the first lightbox to appear
for prototype. Since i use it for overlaying forms i called it submodal.

Source code is subject to change and it is licensed under thesame license
as jQuery:
http://administratie.webunity.nl/js/wuSubmodal.js
http://administratie.webunity.nl/css/wuSubmodal.css

Regards,

Gilles
(p.s. back on monday 18th)


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] AJAXGrid plugin - text version

2006-08-23 Thread Gilles Vincent
Impressive !
However, it's really buggy on Opera :(
Sounds really promising althought
--
2006/8/21, Stefan Petre [EMAIL PROTECTED]:
 Maybe this time the text gets right:

 This is a plugin I worked on a lot. Has a lot of features:

 * in place edit: the cells converts into text field, textarea or select
 * resizeable columns
 * keyboard navigation
 * live scrolling
 * triggers events on select and onsort , based on those you can link
   two grids or interact with other JavaScript function of your own
 * AJAX driven data loading based on a simple XML format
 * buffers data
 * basic API to interact with the grid from outside
 * the possibility to filter on server side the data inserted by user

 I'm working on:

 * on a reasonable date picker to edit date fields
 * freezed columns on horizontal scroll
 * resizeable grid

 demo at http://interface.eyecon.ro/demos/grid.html

 NOTE: don;t jump to use this plugin because:

1. is a very alpha
2. I haven't decide under which license will be released



 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] rev. 217: Bugfix in $.fn.serialize

2006-08-19 Thread Webunity | Gilles van den Hoven
@John, please read since the each function could still contain a bug 
(see bottom 2 lines)

Hi guys,

I've just committed a bug fix to the form plugin. As you might have 
seen, I noticed that i somehow got an fieldset element instead of a form 
element in the $.fn.ajaxSubmit function. By doing a traceback i noticed 
that the following code would produce HtmlFormElement and 
HtmlFieldsetElement, so the bug was in the serialize function.:
alert(this[0]);
if ( !this.vars ) this.serialize();
alert(this[0]);


Anyway, long story short, i changed this:
...
a.push({name: n, value: this.value});
});
...

into
...
a.push({name: n, value: this.value});
}).end();
...

Although this fixes the bug, it is confusing to me when we sometimes 
need an end and sometimes not with the each() command.

/*John can you take a look at the serialize function and the possibility 
that the each function changes the this object? (and thus is buggy?)*/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .contains() ?

2006-08-16 Thread Webunity | Gilles van den Hoven
John Resig wrote:
 The problem has more to do with the fact that you're doing two things wrong:
 1) You're setting focus to a div element... which is unfocusable.
 2) You're setting focus to the element before you ever finish the focus 
 function of the previous element - creating an infinite loop.
   
Well, it works in Firefox, are you sure it has to be with the timeout?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] First focusable element?

2006-08-16 Thread Webunity | Gilles van den Hoven
Is the following code, to find the first focusable element on the page, 
correct? Or am i missing something (e.g. other elements, ordering etc.)?

oElem = 
$(document).find(a,frame,iframe,label,input,select,textarea,button).filter(:visible).filter(:enabled)[0];

With latest SVN off course

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] How to bind an event to a function of a class?

2006-08-15 Thread Webunity | Gilles van den Hoven
Hi Guys,

How can i bind/unbind an event to a specific function of a class?

e.g.

class {
somecallback() {
},
somefunc() {
$(document).keypress(this.somecallback);
},
otherfunc() {
$(document).unkeypress(this.somecallback);
}
}

Is this possible?

Thanx,

Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] .contains() ?

2006-08-15 Thread Webunity | Gilles van den Hoven
I'm trying to figure something out, but i'm kinda lost in the documented 
jQuery code...

Is there a way to see if an object is a child of another object?

e.g. if a link is a child of a div?

link1
div
link2
/div

based upon the outcome, i need to do something, which i am going to 
share, but first i need to get it working :)

-- Gilles

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] .contains() ?

2006-08-15 Thread Webunity | Gilles van den Hoven
John Resig wrote:
 Hope this helps. (This is with the SVN version of jQuery)
   
Hmm, not really I am trying to do something like this:
If the event receiving the focus is not a child of another object, set 
the focus back to that object.
As you might guess, this is for a new style lightbox :)
I am trying to prevent that a user can tab out of a lightbox, e.g. to 
a link at the bottom of the page

Here's what i got so far, but it doesn't work yet...

-- Can someone help me?

-
javascript
-
$(document).focus(
function(oEvent) {
var oElem = oEvent.srcElement || oEvent.target;

while (oElem = oElem.parentNode) {
if (oElem == $('#test').get(0)) {
return true;
}
}

// todo: set focus on another element
$('#test').get(0).focus();

return false;
}
);


-
code
-
a href=/1link 1/a | a href=/2link 2/a | a 
href=/3link 3/abr /
br /

div id=test
a href=/4link 4/a | a href=/5link 5/a | a 
href=/6link 6/a
/div


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/