Closed Bug 299312 Opened 20 years ago Closed 19 years ago

Make week view editing only use textboxes when editing

Categories

(Calendar :: Lightning Only, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pavlov, Assigned: pavlov)

Details

Attachments

(1 file, 1 obsolete file)

Instead of always having a textbox in the event boxes, we should swap one in
when we go in to edit mode, otherwise just use a label.  This makes things much
faster.
Attached patch Fix (obsolete) — — Splinter Review
Attachment #187890 - Flags: first-review?(vladimir)
Comment on attachment 187890 [details] [diff] [review]
Fix

>       <property name="occurrence">
>         <getter><![CDATA[
>@@ -1262,9 +1267,9 @@
>         ]]></getter>
>         <setter><![CDATA[
>           this.mOccurrence = val;
>-          var evl = this.eventNameElement;
>+          var evl = this.eventNameLabel;
> 
>-          if (val) {
>+          if (val && val != "") {
>               evl.value = val.title;
>           } else {
>               evl.value = "Untitled Event";

If you use .value to set a label, you don't get the word wrapping and other
nice behaviour.  You need to create a text node and insert it as the label's
child (need to remove old child nodes of the label too).

>+          this.editingTimer = null;
>+          this.mOriginalTextLabel = this.eventNameLabel.value;

Just pull this from the event's summary property, not the label.
Attached patch updated — — Splinter Review
this fixes it to do what you said as well as adds support canceling on escape
and saving on enter.
Attachment #187890 - Attachment is obsolete: true
Attachment #187897 - Flags: first-review?(vladimir)
Comment on attachment 187897 [details] [diff] [review]
updated

r=vladimir
Attachment #187897 - Flags: first-review?(vladimir) → first-review+
Attachment #187890 - Flags: first-review?(vladimir)
checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
QA Contact: shaver → lightning
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: