PATCH: silence warnings Ticket/Elements/EditCustomFieldSelect

[Once more, with right filename and patch attached … please ignore previous]

Attached.

While there’s a bit of a refactor involved toward the end, this diff is
largely just a rework of the indents to be consistent (which makes it
easier to refactor =). I pulled a bunch of “… && … && … &&” stuff
out of a <%%> element around the ‘SELECTED’ line and collapsed the logic
a bit.

I desperately wanted to refactor to eliminate the “if (1)” bit, but I
don’t have time to get clear on how the semi-global @levels is being
used. Maybe later.

Cheers!

–j
Jim Meyer, Geek at Large purp@acm.org

Elements.EditCustomFieldSelect.patch (2.15 KB)

Attached.

While there’s a bit of a refactor involved toward the end, this diff is
largely just a rework of the indents to be consistent (which makes it
easier to refactor =). I pulled a bunch of “… && … && … &&” stuff
out of a <%%> element around the ‘SELECTED’ line and collapsed the logic
a bit.

It’s very hard to see what you actually changed with the big indent
change. Could you do this as two layered patches?

Hello!On Wed, 2005-11-16 at 16:55, Jesse Vincent wrote:

While there’s a bit of a refactor involved toward the end, this diff is
largely just a rework of the indents to be consistent (which makes it
easier to refactor =). I pulled a bunch of “… && … && … &&” stuff
out of a <%%> element around the ‘SELECTED’ line and collapsed the logic
a bit.

It’s very hard to see what you actually changed with the big indent
change. Could you do this as two layered patches?

Happily so, and I’ve corrected the subject’s misplaced location, too.

Attached are the indent revision (EditCustomFieldSelect.indent.patch)
and the silencing of the warnings (EditCustomFieldSelect.fixes.patch).

Cheers!

–j
Jim Meyer, Geek at Large purp@acm.org

Elements.EditCustomFieldSelect.fixes.patch (1.5 KB)

Elements.EditCustomFieldSelect.indent.patch (1.73 KB)

Hello again!On Wed, 2005-11-16 at 17:40, Jim Meyer wrote:

On Wed, 2005-11-16 at 16:55, Jesse Vincent wrote:

While there’s a bit of a refactor involved toward the end, this diff is
largely just a rework of the indents to be consistent (which makes it
easier to refactor =). I pulled a bunch of “… && … && … &&” stuff
out of a <%%> element around the ‘SELECTED’ line and collapsed the logic
a bit.

It’s very hard to see what you actually changed with the big indent
change. Could you do this as two layered patches?

Happily so, and I’ve corrected the subject’s misplaced location, too.

Attached are the indent revision (EditCustomFieldSelect.indent.patch)
and the silencing of the warnings (EditCustomFieldSelect.fixes.patch).

Please drop the previous EditCustomFieldSelect.fixes.patch and make use
of this one. The last one buggered the logic as I misread the second
term of:

<%$Values->HasEntry($value->Name) && ($$SelectedRef = 1) && ‘SELECTED’%>

… as a condition (==) rather than assignment; little wonder I didn’t
much like the original logic. I also left the single-quotes on SELECTED
while making it an HTML literal, so the whole thing started misbehaving
on me (though it was very quiet about it ;p).

Cheers!

–j
Jim Meyer, Geek at Large purp@acm.org

Elements.EditCustomFieldSelect.fixes.patch (1.48 KB)