Closed Bug 96477 Opened 23 years ago Closed 23 years ago

Image properties window needs an option to remove the link border

Categories

(SeaMonkey :: Composer, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: TucsonTester2, Assigned: cmanske)

Details

Attachments

(4 files, 4 obsolete files)

From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (Win98; U)
BuildID:    20010816

I added a link to my image and there was no option to easily click an option 
like "do not display link border around image" which would look better if my 
image was a button for example.  I'm just bringing this up because there are 
people out there that don't know much html and may not know that they can just 
make the border value 0 to make it not display.

Reproducible: Always
Steps to Reproduce:
1.insert an image
2.highlight the image and click the link button in the toolbar
3.insert a link and click ok

Actual Results:  A link border will be displayed around the image.  This can be 
a not desirable option, especially for images that are buttons.  So, in order to 
change this there should be an option in the Image Properties that allows users 
to check or uncheck an option like "Do not display link border", instead of 
having to set the border value to 0.  This is something that would be better for 
novice users.

Expected Results:  The option to turn the link border on or off would be a nice 
addition.
-->cmanske
Assignee: brade → cmanske
Target Milestone: --- → mozilla1.1
I'm not sure if a separate control is necessary to do what is already there:
set the border. I can see adding some text under the "Border" input field that
says:
"Use 0 to turn off
borders in links"
How does that sound?
Status: UNCONFIRMED → NEW
Ever confirmed: true
*if* we choose to solve this problem with extra text (in an already crowded 
dialog, I'm not convinced it's a good idea), then we should only show that text 
if the image is a link.  Perhaps the control belongs in the link dialog instead 
(checkbox for Don't show link border on this image)?
That could work too, I believe the easiest for a user would be an option box in
either the Image or the link properties menu.  I like the image properties
window the most because the border="0" is an image property, and the image
properties menu comes up when double clicking the linked image.  The link
properties is a good solution too, because it can be set up at link creation.  

Another solution, if possible, would be to default linked or unlinked image
borders to 0.  It's not often that a person uses a link border around an image. 

But if there is any way of putting one of the options it would be very appreciated.
spam composer change
Component: Editor: Core → Editor: Composer
Attached patch Add Link tab to image properties (obsolete) — Splinter Review
Now you can link an image when inserting it, which might remind you to turn the
border off...
Attached patch Updated patch (obsolete) — Splinter Review
Good work! I really like integrating the Named Anchors and headings as a popup
menulist. I improved what you did by doing the same for the main Link
Properties
dialog and moving common code into EdDialogOverlay.xul and EdDialogCommon.js.
I also added a checkbox in the "Link" panel:
[ ] Show border around linked image
that simply manipulates the "border" attribute in the "Appearance" tab.
After all, that was the original purpose of this bug!
Attachment #66728 - Attachment is obsolete: true
Adding Neil to CC list.
Note that this greatly simplifies the Link Properties dialog, completely removing
the need for a "More / Fewer" section.
Status: NEW → ASSIGNED
Keywords: patch, review
Whiteboard: FIX IN HAND, need r=,sr=
Target Milestone: mozilla1.1 → mozilla0.9.9
Attached patch A few extra fixes (obsolete) — Splinter Review
Removed flex from the menulist, becuase it's in a vbox
Moved chooseLinkFile into EdDialogCommon.js
Merged 2nd checkbox and button into cmanske's new vbox
Put the remove link message back but fixed it not for new links.
Attachment #66860 - Attachment is obsolete: true
Attached patch Updated patch (obsolete) — Splinter Review
Incorprated Neil's suggestions from patch 67261 as well as some more of my
own, except for the "Clear text to remove existing link from page" message
code.
Upon further reflection and discussion, we decided that just adds clutter to
the
dialog and isn't really necessary.
Attachment #67261 - Attachment is obsolete: true
Attached patch More issuesSplinter Review
Removed some old code from an old patch rather than commenting it out.
Removed some old elements from EdDialogOverlay.xul, again from an old patch.
Commented out the remove link message in case it gets reinstated.
Called ChangeLinkLocation() in EdImageProps.js instead of duplicating code.
Moved link border checkbox code in case of advanced editing.
Fixed EdLinkProps.js to relativize the right checkbox.
Removed chooseLinkFile() and GetExistingHeadingIndex() from EdLinkProps.js
Removed unnecessary flex.
Comment on attachment 67898 [details] [diff] [review]
More issues

r=cmanske
Used all of Neil's latests suggestions except keeping the "(Clear text to
remove existing link from page.)" text
Attachment #67898 - Flags: review+
Attachment #67805 - Attachment is obsolete: true
Keywords: nsbeta1+
Whiteboard: FIX IN HAND, need r=,sr= → FIX IN HAND, need sr=
Comment on attachment 67898 [details] [diff] [review]
More issues

sr=kin@netscape.com

Just remove the commented code that was added.

Also, I know you just moved onAccept() between files, I was just curious why
the code wraps only some editorShell calls with try/catch and not all the
others?
Attachment #67898 - Flags: superreview+
Whiteboard: FIX IN HAND, need sr= → FIX IN HAND, reviewed
checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Keywords: patch, review
Resolution: --- → FIXED
Whiteboard: FIX IN HAND, reviewed
> Also, I know you just moved onAccept() between files, I was just curious why
> the code wraps only some editorShell calls with try/catch and not all the
> others?

Do you want to file a separate bug for that or should I just attach a fix here?
reopen bug
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
the above patches need work; the endBatchChanges call in the "finally" block
should probably have its own try/catch or something along those lines
This version uses try/catch instead of try/finally so I have to dump any
exception to the console because the JS console won't see it.

brade: Begin/EndBatchChanges are always outside try blocks.
I think editorshell.BeginBatchChanges and editorshell.EndBatchChanges should
both be in a try/catch block since either of them could throw an error. 
However, you *do* need to ensure that they are matched up.
We use the BeginBatch / EndBatch calls in many places and since they do need to
match, I don't see how we can put them in try/catch. Chances of failure are 
*extremely* low.
Comment on attachment 68879 [details] [diff] [review]
Alternative using catch instead of finally

r=cmanske
Attachment #68879 - Flags: review+
Status: REOPENED → ASSIGNED
Keywords: patch, review
Whiteboard: FIX IN HAND, need sr=
If BeginBatchChanges() fails, you could in theory try to do the changes anyway
but I don't see the point. If EndBatchChanges() fails then you are stuffed anyway.
Comment on attachment 68879 [details] [diff] [review]
Alternative using catch instead of finally

r=kin
Attachment #68879 - Flags: superreview+
checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Keywords: patch, review
Resolution: --- → FIXED
Whiteboard: FIX IN HAND, need sr=
Verified on Win 2k using trunk build 02-14.
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: