[dev] [commits] Horde branch master updated. baa6bef4c2697f04ac77f3d96055b8cb80c136b5

Ben Klang ben at alkaloid.net
Tue Jan 12 19:19:11 UTC 2010


On Jan 12, 2010, at 1:20 PM, Ben Klang wrote:

> 
> On Jan 12, 2010, at 12:50 PM, Michael M Slusarz wrote:
> 
>> Quoting Ben Klang <ben at alkaloid.net>:
>> 
>>> Michael,
>>> 
>>> Your change below actually does not work.  I suspect the problem is because your change relies on jQuery being loaded, which is not the case when simply using Horde_Form outside of IMP or Kronolith.
>>> 
>>> Two possible options:
>>> 1) Have the Horde_Ui_VarRenderer_Html include jQuery?
>>> 2) Modify the JS to not rely on jQuery
>> 
>> We don't use jquery - we use prototypejs.  And prototypejs *has* to already have been loaded since the calendar js depends on it - not to mention the observe() call and many of the features inside of the observe callback function also.
>> 
>> So 2 isn't an option and 1 is irrelevant (the call to Horde_Ui_JsCalendar::init() will have already added prototype.js to the page output if it hasn't been added already).
>> 
>> Try what I just committed.  The element that has the event fired on it is a level deeper than the SELECT elements - previous() only works at a sibling level.
>> 
> 
> I did a lot more reading; sorry for the red herring about jQuery.  I didn't recognize the selector syntax, but I see how you're using it now.
> 
> I came to the same conclusion you did about needing to go up() to get the siblings just as your commit message hit.  Unfortunately, that still doesn't fix it.  I'm thinking at the moment that the square brackets in the name may be part of the issue.  This is what Opera's JS debugger says:
> 
> 
>>>> elt.parentNode.previous('SELECT[name$=[month]') 
> undefined
>>>> elt.parentNode.previous('SELECT[name$=]') 
> [object HTMLSelectElement]
>>>> elt.parentNode.previous('SELECT[name$=month]') 
> undefined
>>>> elt.parentNode.previous('SELECT[name$=]') 
> [object HTMLSelectElement]
>>>> elt.parentNode.previous('SELECT[name$=]').id 
> "startdate[year]"
>>>> elt.parentNode.previous('SELECT[name$=r]').id 
> Cannot convert undefined or null to Object
> 
> As you can see it seems OK with selecting the element ending n ']' but not with any string prepending the ']'.  Not sure why though.  I can confirm it's not working (after your patch) in Opera, FF3.5 and Safari.  I just happened to be in Opera when I was debugging here.

Allow me to contradict myself again.  Looks like this was a simple case of missing square brackets.  Changes committed and pushed, tested working on my system.

> 
> /BAK/
> 
> 
>> michael
>> 
>> -- 
>> ___________________________________
>> Michael Slusarz [slusarz at horde.org]
>> 
>> 
>> -- 
>> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
>> Frequently Asked Questions: http://horde.org/faq/
>> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
> 
> -- 
> Ben Klang
> Alkaloid Networks LLC
> ben at alkaloid.net
> 404.475.4850
> http://projects.alkaloid.net
> 
> 
> 
> -- 
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org

-- 
Ben Klang
Alkaloid Networks LLC
ben at alkaloid.net
404.475.4850
http://projects.alkaloid.net




More information about the dev mailing list