Roundup Tracker - Issues

Issue 992166

classification
classhelp doesn't work for some fields
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed fixed
:
: richard : chrisgltt, larse, marlonvdb, richard
Priority: normal :

Created on 2004-07-16 08:05 by larse, last changed 2004-10-20 06:02 by marlonvdb.

Files
File name Uploaded Description Edit Remove
nle.diff larse, 2004-07-19 07:29 local diff that has the classhelp problem
Messages
msg1358 Author: [hidden] (larse) Date: 2004-07-16 08:05
Hi,

I've extended the default "issue" schema with a few new
multilinks that I'm trying to set with the default
classhelp template, e.g.

    author = Class(db, "author",
                   authorname=String(),               
      
                   address=String(),    realname=String(),
                   phone=String(),     
organisation=String(),
                   alternate_addresses=String())
    author.setkey("authorname")

and then in issue.item.html

<tr>
  <th>Authors</th>
  <td colspan=3>
  <span tal:replace="structure
python:context.authors.field(size=60)" />
  <span tal:replace="structure
python:db.author.classhelp('authorname,realname,address',
property='authors', width='600')" />
 </td>
</tr>

This doesn't seem to work. While the contents of the
list are fine, clicking checkboxes doesn't update the
preview, and applying does nothing.

Even stranger, classhelp right now only works for the
"nosy" field, not even the "superseder" default one.

I'm kind of at a loss here, any ideas what I should be
looking at?

Thanks,

Lars
msg1359 Author: [hidden] (richard) Date: 2004-07-19 00:19
Logged In: YES 
user_id=6405

Works for me... 
 
What browser are you using? 
msg1360 Author: [hidden] (larse) Date: 2004-07-19 06:30
Logged In: YES 
user_id=33032

I tried with Camino (Mozilla-based) and Safari
(Konquerer-based.)
msg1361 Author: [hidden] (richard) Date: 2004-07-19 06:47
Logged In: YES 
user_id=6405

Both Konqueror (3.2.0), Firefox (0.9) and Safari (1.2.2) worked for 
me here. What I did: 
 
1. "python demo.py nuke" 
2. edit demo/dbinit.py to add the author Class (smaller schema 
    to make things easier):: 
 
    author = Class(db, "author", authorname=String(),  
        realname=String()) 
    author.setkey("authorname") 
 
3. and the issue Class to add the author Multilink:: 
 
    issue = IssueClass(db, "issue", 
                    assignedto=Link("user"), topic=Multilink("keyword"), 
                    priority=Link("priority"), status=Link("status"), 
                    authors=Multilink('author')) 
 
4. added the HTML as you give above to the issue.item.html 
    page, minus the address bit. 
5. "python demo.py" 
6. As "admin", use the Class List to edit the author list to add 
    several dummy authors. 
7. Hit "Create New" issue. Used the (list) interface to select 
   some authors. 
 
All worked ok... 
msg1362 Author: [hidden] (larse) Date: 2004-07-19 07:29
Logged In: YES 
user_id=33032

Very strange, that's pretty much what I did.

I'm attching a diff of the problematic tracker against a
standard one, maybe something in the diff will give you a
hint on what is going wrong here.

Thanks,
Lars
msg1363 Author: [hidden] (chrisgltt) Date: 2004-08-27 19:23
Logged In: YES 
user_id=1112215

Hi, I got the same problem too, does anybody know how to 
solve the problem?
msg1364 Author: [hidden] (marlonvdb) Date: 2004-08-27 19:47
Logged In: YES 
user_id=1080231

I also had those problems. Our solution was to rewrite a part 
of the help_class.js file and to change the call to the popup 
window.
The problem is in the javascripts. They work for some 
browsers, but not all. IE 4 is very bad with the help class. IE 
5.0 somewhat better. IE 5.5 and IE 6 are OK.

Regards,
Marlon
msg1365 Author: [hidden] (anonymous) Date: 2004-09-02 17:33
Logged In: NO 

I faced the problem before, it looks like if you just have one 
instance in your table, then it won't work, and if you have 
multiple instances in your table, then it will work
msg1366 Author: [hidden] (richard) Date: 2004-10-15 01:15
Logged In: YES 
user_id=6405

I'm going to close this issue as Works For Me. 
 
Happy to accept a Javascript patch that fixes things for older 
versions of IE (and *doesn't* break it for newer browsers) but I'm 
not going to try to fix it - I don't even have access to a testing 
environment. 
 
Recommend that users upgrade to a more recent browser. 
 
msg1367 Author: [hidden] (marlonvdb) Date: 2004-10-15 05:50
Logged In: YES 
user_id=1080231

Hi Richard,

In our offices we use IE 4.0, 5.0, 5.5, 6.0 and Firefox 1.0. 
Initial the classhelp didn't work for IE 4.0 and 5.0 (for the 
others it did). One of the problems was the javascript 
*undefined* test value used in 'help_controls.js'. IE 4.0 and 
5.0 doesn't kown *undefined*, so we had to make it known. 
Adding:
  undefined = self.document.bill_gates;
on the first line of the 'help_controls.js' file did the trick. It 
won't give conflict problems with IE 5.5, 6.0 and Firefox 1.0.

I even believe that you hinted us on that simple fix.

Best regards,
Marlon
msg1368 Author: [hidden] (richard) Date: 2004-10-19 22:17
Logged In: YES 
user_id=6405

Is that all that's needed to fix it? 
msg1369 Author: [hidden] (marlonvdb) Date: 2004-10-20 06:02
Logged In: YES 
user_id=1080231

It did solve our problems with IE 4.x and IE 5.0. There was 
one more thing that we did, but I'm not sure if it really did 
mather. The we removed including the python method 
*base_javascript* from all sources and put the code created 
by that method into a *base_javascript.js* file and changed 
the absolute url in method *help_window* into a relative one 
(not putting the TRACKER_WEB before the *helpurl*). Why? 
Well sometimes did would the popup not appear for some 
instances. With this fix it always appeared.

Best regards,
Marlon
History
Date User Action Args
2004-07-16 08:05:58larsecreate