Closed Bug 333029 Opened 19 years ago Closed 19 years ago

XBLize xf:message

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

Details

(Keywords: fixed1.8.0.5, fixed1.8.1)

Attachments

(3 files, 2 obsolete files)

XBLize xf:message.
Attached patch like this. (obsolete) — Splinter Review
This makes message to inherit delegatestub. This way SNB is easy to handle. The UI part is implemented in XBL.
Attachment #217455 - Flags: review?(allan)
Attached patch using hasBoundNode, not getValue (obsolete) — Splinter Review
Attachment #217455 - Attachment is obsolete: true
Attachment #217464 - Flags: review?(allan)
Attachment #217455 - Flags: review?(allan)
Status: NEW → ASSIGNED
Comment on attachment 217464 [details] [diff] [review] using hasBoundNode, not getValue > Index: nsXFormsMessageElement.cpp > =================================================================== > NS_IMETHODIMP > nsXFormsMessageElement::WillChangeDocument(nsIDOMDocument *aNewDocument) > { > if (mDocument) { > if (mEphemeralTimer) { > @@ -314,25 +244,26 @@ nsXFormsMessageElement::WillChangeDocume > // If we are currently trying to load an external message, cancel the > // request. > if (mChannel) { > mChannel->Cancel(NS_BINDING_ABORTED); > } > } > mDocument = aNewDocument; > + nsXFormsDelegateStub::WillChangeDocument(aNewDocument); > return NS_OK; > } > NS_IMETHODIMP > nsXFormsMessageElement::OnDestroyed() > { > - mElement = nsnull; > - mVisualElement = nsnull; > mChannel = nsnull; > + mDocument = nsnull; > + nsXFormsDelegateStub::OnDestroyed(); > return NS_OK; > } Shouldn't you return the error values from the superclasses in both of these functions? > Index: resources/content/xforms.css > =================================================================== > +message[level="ephemeral"] > html|div.-moz-xforms-message-container, > +hint > html|div.-moz-xforms-message-container { > + background-color: InfoBackground; > + color: InfoText; > + padding: 2px 3px; > + font: message-box; > + border: 1px black solid; > + position: absolute !important; > + z-index: 2147483647; > + width: auto; > + height: auto; > + display: inherit; > } Do we want all this default styling? Until now our styling has been minimal for all controls. An empty message also show up as a small black box with this. <xforms:message level="ephemeral"/> Could previously be used to clear any currently shown ephemeral message.
(In reply to comment #3) > > Shouldn't you return the error values from the superclasses in both of these > functions? Oh, yes. > > Do we want all this default styling? Yes, the default should IMO look like normal tooltip. > Until now our styling has been minimal for > all controls. An empty message also show up as a small black box with this. > <xforms:message level="ephemeral"/> > Could previously be used to clear any currently shown ephemeral message. > Oh, I didn't know this :) Couldn't you still make this using message[level="ephemeral"] { display: none;} ?
(In reply to comment #4) > (In reply to comment #3) > > > > Do we want all this default styling? > > Yes, the default should IMO look like normal tooltip. Hmmm. > > Until now our styling has been minimal for > > all controls. An empty message also show up as a small black box with this. > > <xforms:message level="ephemeral"/> > > Could previously be used to clear any currently shown ephemeral message. > > > Oh, I didn't know this :) Couldn't you still make > this using message[level="ephemeral"] { display: none;} ? Then all my messages would disappear. Yes, problem solved ;-) How about at least having an appearance="minimal" version without all the styling?
Attached file "testcase"
Here's an example of trying to style the messages
(In reply to comment #5) > (In reply to comment #4) > > Oh, I didn't know this :) Couldn't you still make > > this using message[level="ephemeral"] { display: none;} ? > > Then all my messages would disappear. Yes, problem solved ;-) > Äh, <message class="hide"> .hide { display: none; }
Attached file "testcase" 2
Attached patch better stylingSplinter Review
Attachment #217464 - Attachment is obsolete: true
Attachment #217871 - Flags: review?(allan)
Attachment #217464 - Flags: review?(allan)
Comment on attachment 217871 [details] [diff] [review] better styling Much better. r=me
Attachment #217871 - Flags: review?(allan) → review+
Attachment #217871 - Flags: review?(doronr)
Attachment #217871 - Flags: review?(doronr) → review+
Checking in Makefile.in; /cvsroot/mozilla/extensions/xforms/Makefile.in,v <-- Makefile.in new revision: 1.56; previous revision: 1.55 done RCS file: /cvsroot/mozilla/extensions/xforms/nsIXFormsEphemeralMessageUI.idl,v done Checking in nsIXFormsEphemeralMessageUI.idl; /cvsroot/mozilla/extensions/xforms/nsIXFormsEphemeralMessageUI.idl,v <-- nsIXFormsEphemeralMessageUI.idl initial revision: 1.1 done Checking in nsXFormsMessageElement.cpp; /cvsroot/mozilla/extensions/xforms/nsXFormsMessageElement.cpp,v <-- nsXFormsMessageElement.cpp new revision: 1.19; previous revision: 1.18 done Checking in resources/content/xforms.css; /cvsroot/mozilla/extensions/xforms/resources/content/xforms.css,v <-- xforms.css new revision: 1.28; previous revision: 1.27 done Checking in resources/content/xforms.xml; /cvsroot/mozilla/extensions/xforms/resources/content/xforms.xml,v <-- xforms.xml new revision: 1.33; previous revision: 1.32 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Keywords: fixed1.8.1
Keywords: fixed1.8.0.5
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: