Can't copy field from LDAP Address Book

VERIFIED FIXED

Status

MailNews Core
Address Book
--
enhancement
VERIFIED FIXED
13 years ago
9 years ago

People

(Reporter: Tim Gerundt, Assigned: standard8)

Tracking

({fixed-seamonkey1.0, fixed1.8.1})

Trunk
fixed-seamonkey1.0, fixed1.8.1

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7) Gecko/20040616
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7) Gecko/20040616

I can't copy values from an LDAP Address Book, because the textboxes are disabled.

So I do not have a possibility to copy a telephone number or street name for
example.
Quite unpractically! ;-)

Reproducible: Always
Steps to Reproduce:
1. Search for entries in a LDAP Directory.
2. Show properties from an Address Card.
3. Try to copy a telephone number or street name for example.

Actual Results:  
Can't copy values from the textboxes.

Expected Results:  
Possibility to copy values from the textboxes.

Comment 1

13 years ago
Dup of bug 35837, by way of dup bug 124230 and others
Related: bug 96968

*** This bug has been marked as a duplicate of 35837 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 2

13 years ago
Excuse me, but this is not a dup of bug 35837!

I don't want to copy the *whole* address cards, only a single value from it!
For example the telephone number or street name. I want to copy it to the 
clipboard and paste it in an other program (maybe Word, OpenOffice, ...).
Because LDAP Address Books are read-only, the textbox are disabled.
That is logical, but unpractically. Maybe just set the textbox *read-only*, so 
that one have still the edit menu (without cut & paste)?

Bug 96968 is a similar problem, but not the same (because the bug is for the 
preview-pane and not for LDAP Addresses).
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Product: Browser → Seamonkey
confirming
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Hardware: PC → All
Summary: Can't copy values from LDAP Address Book → Can't copy field from LDAP Address Book

Updated

12 years ago
Assignee: sspitzer → mail

Comment 4

12 years ago
*** Bug 299977 has been marked as a duplicate of this bug. ***
(Assignee)

Comment 5

12 years ago
I think we should just be able to change the disable of the text boxes to making them readonly - that way the events to allow copy etc will still be enabled, but the user won't be able to change them.
Assignee: mail → bugzilla
Component: Address Book → MailNews: Address Book
Product: Mozilla Application Suite → Core
QA Contact: addressbook
(Assignee)

Comment 6

12 years ago
Created attachment 204303 [details] [diff] [review]
Thunderbird version

This patch (for Thunderbird):
- Changes from setting disable to readonly for read-only address books.
- Re-uses the useful array of field names to set readonly for most of the field which
- allows removal of "disableforreadonly" attribute setting in the xul code.

Note that (at least on my Linux box) the default thunderbird theme the text boxes appear "normal", as read-only is white background and black text. The disabled text boxes are white background & grey text

Should this be changed as well?
Attachment #204303 - Flags: superreview?(mscott)
Attachment #204303 - Flags: review?(bienvenu)
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 7

12 years ago
Created attachment 204307 [details] [diff] [review]
SeaMonkey version (checked in)

This patch (for SeaMonkey):
- Changes from setting disable to readonly for read-only address books.
- Re-uses the useful array of field names to set readonly for most of the field
which
- allows removal of "disableforreadonly" attribute setting in the xul code.
Attachment #204307 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #204307 - Flags: review?(neil.parkwaycc.co.uk)

Updated

12 years ago
Attachment #204303 - Flags: review?(bienvenu) → review+

Comment 8

12 years ago
Comment on attachment 204307 [details] [diff] [review]
SeaMonkey version (checked in)

>+        // Disable all the editable vcard fields.
>+        for (var i = kVcardFields.length; i-- > 0; )
>+          document.getElementById(kVcardFields[i][0]).readonly = true;
If only kVcardFields was a hash i.e.
const kVcardFields = {
  FirstName: "firstName",
...
  Notes: "notes"};
then you could use:
  for (var id in kVcardFields)
    document.getElementById(id).readonly = true;
(In the other loops, kVcardFields[i][1] would become kVcardFields[id])

>+        // And the phonetic fields
Nit: I'd like a blank line before this comment. In fact, given the change below, I'd like these four lines moved above the previous three.

>+        document.getElementById("PhoneticLastName").disabled = true;
>+        document.getElementById("PhoneticFirstName").disabled = true;
These should be readonly right? r+sr=me with that fixed.
I guess unrolling the loop over the phonetic fields array is a win here ;-) Maybe you should cross-reference kPhoneticFields in some way though, either a comment or using [N][0]?
Attachment #204307 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #204307 - Flags: superreview+
Attachment #204307 - Flags: review?(neil.parkwaycc.co.uk)
Attachment #204307 - Flags: review+
(Assignee)

Comment 9

12 years ago
Comment on attachment 204307 [details] [diff] [review]
SeaMonkey version (checked in)

Patch checked in with Neil's comments addressed (the kVcardFields array being made into a hash should be a separate bug if we decide to do it IMHO).

I'll update the Thunderbird one to match in a while.
Attachment #204307 - Attachment description: SeaMonkey version → SeaMonkey version (checked in)
(Assignee)

Comment 10

12 years ago
Created attachment 204374 [details] [diff] [review]
Thunderbird version 2 (checked in)

Updated version for Thunderbird incorporating Neil's nits from the SeaMonkey version. Carrying forward bienvenu's r (confirmed ok on irc).
Attachment #204303 - Attachment is obsolete: true
Attachment #204374 - Flags: superreview?(mscott)
Attachment #204374 - Flags: review+
Attachment #204303 - Flags: superreview?(mscott)

Comment 11

12 years ago
Comment on attachment 204374 [details] [diff] [review]
Thunderbird version 2 (checked in)

for me the on Windows, disabled edit fields in the address book card dialog do look correct as far as appearing to be uneditable.
Attachment #204374 - Flags: superreview?(mscott) → superreview+
(Assignee)

Comment 12

12 years ago
Comment on attachment 204374 [details] [diff] [review]
Thunderbird version 2 (checked in)

This patch also checked in

Checking in mail/components/addrbook/content/abCardOverlay.js;
/cvsroot/mozilla/mail/components/addrbook/content/abCardOverlay.js,v  <--  abCardOverlay.js
new revision: 1.12; previous revision: 1.11
done
Checking in mail/components/addrbook/content/abEditCardDialog.xul;
/cvsroot/mozilla/mail/components/addrbook/content/abEditCardDialog.xul,v  <--  abEditCardDialog.xul
new revision: 1.5; previous revision: 1.4
done
Checking in mail/components/addrbook/content/abNewCardDialog.xul;
/cvsroot/mozilla/mail/components/addrbook/content/abNewCardDialog.xul,v  <--  abNewCardDialog.xul
new revision: 1.6; previous revision: 1.5
Attachment #204374 - Attachment description: Thunderbird version 2 → Thunderbird version 2 (checked in)
(Assignee)

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 13 years ago12 years ago
Resolution: --- → FIXED

Comment 13

12 years ago
Comment on attachment 204307 [details] [diff] [review]
SeaMonkey version (checked in)

a=me for SM1.0b, first needed one

Comment 14

12 years ago
Comment on attachment 204307 [details] [diff] [review]
SeaMonkey version (checked in)

a=me for SeaMonkey
(Assignee)

Comment 15

12 years ago
SeaMonkey-only patch checked into 1.8 branch in time for SeaMonkey 1.0b.
Whiteboard: fixed-seamonkey1.0
(Assignee)

Comment 16

12 years ago
(In reply to comment #15)
> SeaMonkey-only patch checked into 1.8 branch in time for SeaMonkey 1.0b.
> 
Also checked into the 1.8.0 branch.
Verified FIXED using a debug, semi-current debug build checked out on January 13th, built on Windows XP.

I can copy read-only textfields from LDAP card entries just fine.
Status: RESOLVED → VERIFIED
(Assignee)

Comment 18

11 years ago
Comment on attachment 204374 [details] [diff] [review]
Thunderbird version 2 (checked in)

Requesting approval, This patch enables copying of ldap fields from cards for Thunderbird - its been on the trunk for a while now, should be a low risk for branch.
Attachment #204374 - Flags: approval-branch-1.8.1?(mscott)
Keywords: fixed-seamonkey1.0
Whiteboard: fixed-seamonkey1.0

Comment 19

11 years ago
Comment on attachment 204374 [details] [diff] [review]
Thunderbird version 2 (checked in)

thanks Mark.
Attachment #204374 - Flags: approval-branch-1.8.1?(mscott) → approval-branch-1.8.1+
(Assignee)

Comment 20

11 years ago
Comment on attachment 204374 [details] [diff] [review]
Thunderbird version 2 (checked in)

check into branch
(Assignee)

Updated

11 years ago
Keywords: fixed1.8.1
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.