Closed Bug 118262 Opened 23 years ago Closed 23 years ago

delete button should be disabled if a card from LDAP directory is selected

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect)

All
Windows ME
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: nbaca, Assigned: srilatha)

Details

(Whiteboard: nab-tbar,nab-ldap)

Attachments

(1 file, 2 obsolete files)

Trunk build 2001-01-04-03: WinMe

Overview: When a card from an LDAP directory is selected in the results pane
then the Delete button should be disabled.
Whiteboard: nab-tbar
Reassign QA contact to myself
QA Contact: nbaca → yulian
srilatha might be working on this.

other commands would be disabled, like new mailing list, add cards, etc.

note, delete would be enabled if the dir tree had focus, but not if the results
pane has focus.
Summary: Delete button should be disabled when a card from an LDAP dir is selected → certain buttons / commands should be disabled when a card from an readonly directory (like LDAP) is selected
Whiteboard: nab-tbar → nab-tbar,nab-ldap
This is a dup of bug 120423. I would like keep this open since the patch I have 
in 120423 does not disable delete button.
Also regarding the add cards and new mailing list see my comment in bug 120423.
http://bugzilla.mozilla.org/show_bug.cgi?id=120423#c2

Changing summary and taking
Assignee: sspitzer → srilatha
Summary: certain buttons / commands should be disabled when a card from an readonly directory (like LDAP) is selected → delete button should be disabled if a card from LDAP directory is selected
Keywords: nsbeta1
Attached patch patch v1 (obsolete) — Splinter Review
This will disable delete buton when a card from a directory is selected
the delete button (and edit | delete) should be enabled when LDAP addressbook 
in the dir tree pane has focus, but not when the LDAP cards in the results pane 
have focus.

I don't think this is the right patch.

see DirPaneHasFocus() in abCommon.js, I think you are going to need that.
Seth, I tested this and when I change the focus to dir tree the delete button is 
enabled. Also the code I added, is in ResultsPaneController:isCommandEnabled(). 
so the disabling of the button should happen only if the results pane has focus.
Even though this is getting an nsbeta1-, since we have a patch, we should get it
in when it's ready.
Status: NEW → ASSIGNED
Keywords: nsbeta1nsbeta1-
Target Milestone: --- → mozilla0.9.9
talked with srilatha, she can just use gAbView.directory 
there might not always be a dirTree, and using gAbView.directory will be 
simpler and faster.
Attached patch patch using gAbView.directory (obsolete) — Splinter Review
Attachment #68558 - Attachment is obsolete: true
Comment on attachment 69773 [details] [diff] [review]
patch using gAbView.directory

new patch coming...
Attachment #69773 - Flags: needs-work+
the problem with the last patch is that we use numselected to set the delete 
menu text.

srilatha is working on a new patch.
Attached patch updated patchSplinter Review
updated the patch based on Seth's comments
Attachment #69773 - Attachment is obsolete: true
Comment on attachment 69785 [details] [diff] [review]
updated patch

one simplifcation:
because you (wisely) made enabled false by default, you can do this:

return (enabled && (numselected > 0));

instead of the if / else.

fix that, and r/sr=sspitzer
Attachment #69785 - Flags: superreview+
Fix checked in 
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified with 2002022103 Wins builds on NT and Win2k

Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: