WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
26950
BugzillaSummaryEdit
Make the summary and alias fields support click-to-edit
https://bugs.webkit.org/show_bug.cgi?id=26950
Summary
Make the summary and alias fields support click-to-edit
Maciej Stachowiak
Reported
2009-07-03 00:59:31 PDT
Make the summary and alias fields support click-to-edit, so Bugzilla can be cool like Flickr.
Attachments
patch
(3.79 KB, patch)
2009-07-03 01:01 PDT
,
Maciej Stachowiak
no flags
Details
Formatted Diff
Diff
patch
(3.79 KB, patch)
2009-07-03 01:19 PDT
,
Maciej Stachowiak
ddkilzer
: review-
Details
Formatted Diff
Diff
Patch v3
(4.41 KB, patch)
2009-07-03 10:23 PDT
,
David Kilzer (:ddkilzer)
mjs
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Maciej Stachowiak
Comment 1
2009-07-03 01:01:22 PDT
Created
attachment 32224
[details]
patch
Maciej Stachowiak
Comment 2
2009-07-03 01:01:59 PDT
My patch is completely untested - I could not figure out how to set up a bugzilla test server to try it out.
Maciej Stachowiak
Comment 3
2009-07-03 01:19:35 PDT
Created
attachment 32225
[details]
patch
David Kilzer (:ddkilzer)
Comment 4
2009-07-03 10:20:43 PDT
Comment on
attachment 32225
[details]
patch
>-function hideEditableField( container, input, action, field_id, original_value ) { >+function hideEditableField( container, input, action, field1_text, field2_text, field_id, original_value ) { > YAHOO.util.Dom.setStyle(container, 'display', 'inline'); > YAHOO.util.Dom.setStyle(input, 'display', 'none'); >- YAHOO.util.Event.addListener(action, 'click', showEditableField, >+ YAHOO.util.Event.addListener(action, 'click', showEditableFieldFocusLast, >+ new Array(container, input)); >+ YAHOO.util.Event.addListener(field2_text, 'click', showEditableFieldFocusLast, >+ new Array(container, input)); >+ YAHOO.util.Event.addListener(field1_text, 'click', showEditableField, > new Array(container, input));
Since field2_text is field_id with "_nonedit_display" appended and field1_text is "alias_nonedit_display", I don't think you need to add two parameters here. Also, adding a new function, showEditableFieldFocusLast(), instead of adding arguments to the array object goes against the design of the JavaScript used elsewhere in the file.
>-function showEditableField (e, ContainerInputArray) { >+function showEditableField (e, ContainerInputArray, focusLast) {
The "focusLast" argument should be passed in with the ContainerInputArray argument.
> } >+ >+ > YAHOO.util.Event.preventDefault(e); > }
Gratuitous whitespace change.
>+function showEditableFieldFocusLast (e, ContainerInputArray) { >+ showEditableField(e, ContainerInputArray, true); >+}
This function won't be needed if you add the "focusLast" argument to the ContainerInputArray.
> hideEditableField( 'summary_alias_container','summary_alias_input', >- 'editme_action','short_desc', short_desc_value); >+ 'editme_action', 'alias_nonedit_display', 'short_desc_nonedit_display', 'short_desc', short_desc_value);
Again, I think we only need to add one argument to hideEditableField(). r- for the above issues. (Patches to Bugzilla should try to match the existing design to make them easier to merge upstream.) FWIW, this patch did work using a local copy of the original page (saved as HTML) with a <base> tag added and the URL to the field.js adjusted to use a local copy. I have an updated patch that I'll post next.
David Kilzer (:ddkilzer)
Comment 5
2009-07-03 10:23:01 PDT
Created
attachment 32240
[details]
Patch v3 Patch with issues in
Comment #4
addressed.
David Kilzer (:ddkilzer)
Comment 6
2009-07-03 10:34:57 PDT
Filed a Bugzilla bug for this enhancement request: Bug 502249: Make the short description and alias fields support click-to-edit <
https://bugzilla.mozilla.org/show_bug.cgi?id=502249
>
Maciej Stachowiak
Comment 7
2009-07-03 14:02:56 PDT
Comment on
attachment 32240
[details]
Patch v3 r=me on your changes. Not sure which one of us should land the patch now. :-)
David Kilzer (:ddkilzer)
Comment 8
2009-07-03 16:43:03 PDT
(In reply to
comment #7
)
> (From update of
attachment 32240
[details]
) > r=me on your changes. Not sure which one of us should land the patch now. :-)
I got it. :)
David Kilzer (:ddkilzer)
Comment 9
2009-07-03 17:21:24 PDT
$ git svn dcommit Committing to
http://svn.webkit.org/repository/webkit/trunk
... M BugsSite/ChangeLog M BugsSite/js/field.js Committed
r45538
http://trac.webkit.org/changeset/45538
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug