Last Comment Bug 330641 - calendar widget for xul
: calendar widget for xul
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: ---
Assigned To: alexander :surkov
: Stephen Pride
:
Mentors:
Depends on: 329204 332945
Blocks: 327236 334503 339080 339082
  Show dependency treegraph
 
Reported: 2006-03-15 19:08 PST by alexander :surkov
Modified: 2016-07-15 14:46 PDT (History)
0 users
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (33.64 KB, patch)
2006-04-05 02:54 PDT, alexander :surkov
no flags Details | Diff | Splinter Review
patch2 (23.33 KB, patch)
2006-05-17 03:23 PDT, alexander :surkov
doronr: review+
allan: review-
Details | Diff | Splinter Review
testcase (985 bytes, application/vnd.mozilla.xul+xml)
2006-05-17 03:23 PDT, alexander :surkov
no flags Details
screenshot (46.18 KB, image/png)
2006-05-24 03:12 PDT, Allan Beaufour
no flags Details
patch3 (28.04 KB, patch)
2006-05-24 03:25 PDT, alexander :surkov
allan: review+
Details | Diff | Splinter Review

Description alexander :surkov 2006-03-15 19:08:42 PST
 
Comment 1 alexander :surkov 2006-04-05 02:54:12 PDT
Created attachment 217271 [details] [diff] [review]
patch

It's only compact calendar widget for xul. I want to do full calendar in next bug. Comments about style issues are looked forward.
Comment 2 alexander :surkov 2006-04-05 22:30:18 PDT
Comment on attachment 217271 [details] [diff] [review]
patch

I want to split the bug on two: "exposing base interface" (bug 332945) and "calendar for xul".
Comment 3 alexander :surkov 2006-05-17 03:23:05 PDT
Created attachment 222326 [details] [diff] [review]
patch2
Comment 4 alexander :surkov 2006-05-17 03:23:48 PDT
Created attachment 222327 [details]
testcase
Comment 5 Allan Beaufour 2006-05-24 01:57:00 PDT
Comment on attachment 222326 [details] [diff] [review]
patch2

I think the behaviour of readonly inputs and outputs are wrong. The UI should
be driven by the instance data. It's ok that the user can navigate RO
calendars, but as soon as focus is lost the control should display the
instance data value. Another bug for that, as XHTML aparently already have
this behaviour too.


> --- mozilla.orig/extensions/xforms/resources/content/widgets-xul.xml	1970-01-01 08:00:00.000000000 +0800

> +      <!-- Return true if node is control element for a day -->
> +      <method name="isDayControl">
> +        <parameter name="aNode"/>
> +        <body>
> +          if (aNode.localName != "toolbarbutton" || aNode.namespaceURI != this.XUL_NS)

nit: split long line

> +      <method name="buildUIInternal">
> +        <body>
> +          <![CDATA[
> +          var dayOfWeekNames = this.getDaysOfWeekNames();
> +
> +          var row = document.createElementNS(this.XUL_NS, "row");
> +
> +          // create days of a week names
> +          var header, description;
> +          for (var i = 0; i < 7; i++) {
> +            description = this.ownerDocument.createElementNS(this.XUL_NS, "description");

nit: split

> --- mozilla.orig/extensions/xforms/resources/skin/widgets-xul.css	1970-01-01 08:00:00.000000000 +0800

> +.toolbarbutton-dn {
> +  list-style-image: url('chrome://global/skin/arrow/arrow-dn.gif');
> +  padding: 0px;
> +  /*padding-left: 3px;
> +  margin-top: -1px;*/

remove commented out stuff

> +  -moz-image-region: rect(1px, 9px, 9px, 1px);
> +}
> +.toolbarbutton-up {
> +  list-style-image: url('chrome://global/skin/arrow/arrow-up.gif');
> +  padding: 0px;
> +  /*padding: 0px 0px 0px 3px;
> +  margin-bottom: -1px;*/

remove commented out stuff

> +.toolbarbutton-up:hover{

add space before {


Other things:
* The up arrow looks "garbled".

* In the testcase, if I enter a year in the input that is not in the drop down, I get these errors:

Warning: reference to undefined property this.yearsLabel
Source File: chrome://xforms/content/widgets-xul.xml
Line: 250
Error: this.yearsLabel has no properties
Source File: chrome://xforms/content/widgets-xul.xml
Line: 250

And the output is not changed according to the input.
Comment 6 Allan Beaufour 2006-05-24 03:12:52 PDT
Created attachment 223161 [details]
screenshot
Comment 7 alexander :surkov 2006-05-24 03:25:41 PDT
Created attachment 223163 [details] [diff] [review]
patch3
Comment 8 Allan Beaufour 2006-05-24 04:44:46 PDT
Comment on attachment 223163 [details] [diff] [review]
patch3

With follow ups, bug 339080 and bug 339082, r=me
Comment 9 Allan Beaufour 2006-05-24 04:49:12 PDT
Fixed on trunk.

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