Last Comment Bug 365907 - use spin controls for xul calendar
: use spin controls for xul calendar
Status: RESOLVED FIXED
: fixed1.8.0.12, fixed1.8.1.4
Product: Core
Classification: Components
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: alexander :surkov
: Stephen Pride
Mentors:
Depends on: 353880
Blocks: xformsa11y 361997 368828
  Show dependency treegraph
 
Reported: 2007-01-04 03:58 PST by alexander :surkov
Modified: 2007-04-23 16:07 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (21.63 KB, patch)
2007-01-31 07:21 PST, alexander :surkov
no flags Details | Diff | Review
screenshot (61.02 KB, image/png)
2007-02-06 00:09 PST, Olli Pettay [:smaug] (high review load, please consider other reviewers)
no flags Details
patch2 (23.15 KB, patch)
2007-02-06 01:30 PST, alexander :surkov
bugs: review+
aaronr: review-
Details | Diff | Review
patch3 (22.49 KB, patch)
2007-02-12 06:19 PST, alexander :surkov
aaronr: review+
Details | Diff | Review

Description alexander :surkov 2007-01-04 03:58:41 PST
Use spin controls for month/year fields of xhtml/xul calendars.
Comment 1 alexander :surkov 2007-01-31 07:20:28 PST
I'd like to do this for XUL calendar only right now.
Comment 2 alexander :surkov 2007-01-31 07:21:49 PST
Created attachment 253483 [details] [diff] [review]
patch
Comment 3 alexander :surkov 2007-02-01 10:03:41 PST
Olli, can you check whether bug 339080 is fixed by this bug?
Comment 4 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2007-02-05 23:37:53 PST
(In reply to comment #3)
> Olli, can you check whether bug 339080 is fixed by this bug?
> 
Calendar looks almost ok. For some reason month field has a bit smaller
"scrollbar" than day field. Any reason for that?

Comment 5 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2007-02-06 00:09:52 PST
Created attachment 254136 [details]
screenshot
Comment 6 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2007-02-06 00:14:27 PST
(In reply to comment #4)
> (In reply to comment #3)
> > Olli, can you check whether bug 339080 is fixed by this bug?
> > 
> Calendar looks almost ok. For some reason month field has a bit smaller
> "scrollbar" than day field. Any reason for that?
> 
Not day, but year field.

Comment 7 alexander :surkov 2007-02-06 01:30:49 PST
Created attachment 254139 [details] [diff] [review]
patch2

What about this?
Comment 8 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2007-02-06 03:32:14 PST
forgot to say that you have windows line endings in the patch.
Comment 9 alexander :surkov 2007-02-06 04:16:54 PST
Comment on attachment 254139 [details] [diff] [review]
patch2

(In reply to comment #8)
> forgot to say that you have windows line endings in the patch.
> 
I'll fix it after Aaron's comments
Comment 10 aaronr 2007-02-09 17:48:13 PST
Comment on attachment 254139 [details] [diff] [review]
patch2


>Index: extensions/xforms/resources/content/widgets-xul.xml
>===================================================================
>RCS file: /cvsroot/mozilla/extensions/xforms/resources/content/widgets-xul.xml,v
>retrieving revision 1.5
>diff -u -p -8 -r1.5 widgets-xul.xml
>--- extensions/xforms/resources/content/widgets-xul.xml	24 Jan 2007 19:54:42 -0000	1.5
>+++ extensions/xforms/resources/content/widgets-xul.xml	6 Feb 2007 08:26:00 -0000

>+  <!-- MONTHBOX -->
>+  <binding id="monthbox"
>+           extends="chrome://global/content/bindings/textbox.xml#textbox">
>+

>+      <method name="_modifyUp">
>+        <body>
>+          this.value++;
>+          this.fireEvent("spinup");
>+          this.fireEvent("change");
>+        </body>
>+      </method>
>+
>+      <method name="_modifyDown">
>+        <body>
>+          this.value--;
>+          this.fireEvent("spindown");
>+          this.fireEvent("change");
>+        </body>
>+      </method>

To be consistent, the change event should be fired before spinup or spindown.

>+
>+      <method name="fireEvent">
>+        <parameter name="aName"/>
>+        <body>
>+          var evt = document.createEvent("Events");
>+          evt.initEvent(aName, true, true);
>+          this.dispatchEvent(evt);
>+        </body>
>+      </method>
>+

To be consistent, spinup and spindown should not be cancelable.

I didn't find anything else.  r-'ing for now just to be sure that you'll be able to make those changes.
Comment 11 alexander :surkov 2007-02-12 06:19:47 PST
Created attachment 254809 [details] [diff] [review]
patch3
Comment 12 alexander :surkov 2007-02-13 23:52:23 PST
checked in by ginn.
Comment 13 aaronr 2007-04-23 16:07:47 PDT
checked into 1.8 branch on 2007-04-12
checked into 1.8.0 branch on 2007-04-16

Note You need to log in before you can comment on or make changes to this bug.