An include file containing one or two small functions is kinda pointless.

Let's merge those into the main .module and remove the includes afterwards.

Comments

sun’s picture

However, let's make sure to do #1181226: Remove viewfield_views_query_alter() function first.

sun’s picture

sun’s picture

Let's also do #1221440: Bogus default value in field widget first, since that is touching surrounding functions.

sun’s picture

Status: Active » Needs review
StatusFileSize
new12.37 KB

Attached patch removes the /theme directory and performs many (but not all) changes discussed in #1071212: Fix viewfield rendering.

The argument parsing functions are merely moved without changes.

sun’s picture

StatusFileSize
new9.82 KB

Re-considered. Let's just do the code reshuffling here.

keithm’s picture

Status: Needs review » Reviewed & tested by the community

Because #1071212: Fix viewfield rendering requires this and since it's just a code shuffle, I'm going to commit this shortly if you don't :)

sun’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Thanks for reporting, reviewing, and testing! Committed to 7.x-2.x.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Guess it would make sense to backport this for easier cross-version diffs... (?)

keithm’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new9.15 KB

For 6.x-2.x.

sun’s picture

Status: Needs review » Needs work
--- viewfield.css
+++ viewfield.css
@@ -1,5 +1,4 @@

odd, this file doesn't exist yet, according to http://drupalcode.org/project/viewfield.git/tree/refs/heads/6.x-2.x ...?

+++ viewfield.module
@@ -140,6 +183,20 @@ function viewfield_widget_settings($op, $widget) {
+function theme_viewfield_select($element) {
...
 function viewfield_widget(&$form, &$form_state, $field, $items, $delta = 0) {
@@ -268,3 +325,62 @@ function viewfield_theme() {

Let's move theme_viewfield_select() below viewfield_theme() -- not in between widget functions.

Speaking of, viewfield_theme() needs to be adjusted for the include/file path.

keithm’s picture

StatusFileSize
new8.99 KB

odd, this file doesn't exist yet, according to http://drupalcode.org/project/viewfield.git/tree/refs/heads/6.x-2.x ...?

It's buried in the theme directory.

Rerolled.

sun’s picture

Status: Needs work » Reviewed & tested by the community

Thanks, looks good.

Though the patch doesn't contain ./viewfield.css at all anymore now -- let's make sure we don't lose it ;)

keithm’s picture

Status: Reviewed & tested by the community » Fixed

Though the patch doesn't contain ./viewfield.css at all anymore now -- let's make sure we don't lose it ;)

Thanks. The latest patch was created without viewfield.css because I did a straight git diff during a staging/stashing inconsistency. Committed correctly though: http://drupalcode.org/project/viewfield.git/commit/c03b694.

Automatically closed -- issue fixed for 2 weeks with no activity.