Re: AW: [Zope3-dev] Re: SVN: zope.location/trunk/s - moved IPossibleSite and ISite from zope.app.component to zope.location

2007-08-23 Thread Marcin Kołoczek

Roger Ineichen napisał(a):
Renaming doesn't make sense to me since in every book and 
documentation ISite is used. I'm against every beautification
which has no benefit. 


IPossibleSite -- ISite makes perfect sense to me.
IPossibleSite -- IComponentSite doesnt make sense to me.
and
IPossibleComponentSite -- IComponentSite is worth to comment on.

Regards
Roger Ineichen


Yes, ISite is already used as a well-known term for Zopers (is short and 
'handy'), but in general I just don't like the name Site/ISite. It does 
not corresponds to the meaning that most of the people from 'outside' of 
'Zope world' have, and it was confusing me at the begining of my history 
with Zope. Even now sometimes looking for a help on Web (googling ;)) is 
a little pain, couse very specific (narrow) key words used for finding a 
solution gives no results, and at the same time not using some of them 
leads to hunderds/thousands of pages with information of 'sites' in the 
meaning of portal/web_apps or others.


Personally I don't like ComponentSite as well (and probably won't like 
anything with the word 'site' inside ;)))


Component- or Local- Registry will be much more appreciated to me, but I 
don't want to vote right now for any of them. I just think that some 
other name(s) (than 'Site') should be invited/proposed, discussed and 
than used (I vote for that!), even for the sake of 'breaking relations' 
to previous name (by 'previous' I mean current term 'Site') that could 
be met in books/docs.


--
Ramok
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] formlib.pageform.pt javascript IE problems and solution

2007-02-15 Thread Marcin Kołoczek

Hi!

When I was playing with widgets, I saw that current version of 
pageform.pt javascript did not work properly in IE ver 6...something ;), 
not actually matters (but worked fine in FF and Opera).


When I changed a few lines, now it works for my IE (6.sth), FF (2.0.0.1) 
and Opera(9.01) versions.

Please check if it is a proper solution to metnioned bug(?).
I'm not able to change it in svn, so if it's OK  maybe someone else 
ought to do that, please? :)


Here is the code:
code
script type=text/javascript
!--
function toggleFormFieldHelp(ob,state) {
 // ob is the label element
 var field = findWidgetDiv(ob);
 if (field) {
   field.style.visibility = state  'hidden' || 'visible';
   var help = document.getElementById(field-help-for- + ob.htmlFor);
   if (help) {
 help.style.visibility = state  'visible' || 'hidden';
   }
 }
}

function findWidgetDiv(label) {
 var element = findFormField(label);
 while (element) {
   if(element.parentNode)
   {
 element = element.parentNode;
 if (element.tagName  element.className  element.tagName == 
'DIV'  element.className == 'widget')

   return element;
   }
 }
}

function findFormField(label) {
 var name = label.htmlFor;
 var field = label.form[name];
 // Multiple fields with the same name, such as radiobuttons
 if (field) {
   if (field.length)
 field = field[0];
   return field; //znalazl i wszytsko jest OK
 }
 // No field with the exact name; find one that starts with the name
 for (var i = 0; field = label.form[i++];) {
   if (field.name  field.name.substr(0, name.length) == name)
 return field;
 }
}
// --
/script
/code

If I can comment a little:
a) as I've read somewhere, it's better to get 'class' atribute directly 
rather than by getAttribute method, and it seems to help in my case,
b) checking if some attribute's value is not null prevents, I think, 
problems in IE.


Cheers!

/Ramok
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com