diff --git a/uc_product/views/uc_product.views.inc b/uc_product/views/uc_product.views.inc index e4833fa..606e1b2 100644 --- a/uc_product/views/uc_product.views.inc +++ b/uc_product/views/uc_product.views.inc @@ -281,78 +281,3 @@ function uc_product_views_data() { return $data; } - -/** - * Implements hook_views_tables_alter(). - * - * Conditionally adds editablefields support. - */ -function uc_product_views_tables_alter(&$tables) { - if (module_exists('editablefields')) { - if (is_array($tables['uc_products']['fields']['model']['option'])) { - $tables['uc_products']['fields']['model']['option']['#options']['editable'] = t('Editable'); - } - else { - $tables['uc_products']['fields']['model']['option'] = array( - '#type' => 'select', - '#options' => array( - 'display' => t('Display'), - 'editable' => t('Editable'), - ), - ); - } - $tables['uc_products']['fields']['model']['form_parents'] = 'base][model'; - if (is_array($tables['uc_products']['fields']['list_price']['option'])) { - $tables['uc_products']['fields']['list_price']['option']['#options']['editable'] = t('Editable'); - } - else { - $tables['uc_products']['fields']['list_price']['option'] = array( - '#type' => 'select', - '#options' => array( - 'display' => t('Display'), - 'editable' => t('Editable'), - ), - ); - } - $tables['uc_products']['fields']['list_price']['form_parents'] = 'base][prices][list_price'; - if (is_array($tables['uc_products']['fields']['cost']['option'])) { - $tables['uc_products']['fields']['cost']['option']['#options']['editable'] = t('Editable'); - } - else { - $tables['uc_products']['fields']['cost']['option'] = array( - '#type' => 'select', - '#options' => array( - 'display' => t('Display'), - 'editable' => t('Editable'), - ), - ); - } - $tables['uc_products']['fields']['cost']['form_parents'] = 'base][prices][cost'; - if (is_array($tables['uc_products']['fields']['sell_price']['option'])) { - $tables['uc_products']['fields']['sell_price']['option']['#options']['editable'] = t('Editable'); - } - else { - $tables['uc_products']['fields']['sell_price']['option'] = array( - '#type' => 'select', - '#options' => array( - 'display' => t('Display'), - 'editable' => t('Editable'), - ), - ); - } - $tables['uc_products']['fields']['sell_price']['form_parents'] = 'base][prices][sell_price'; - if (is_array($tables['uc_products']['fields']['weight']['option'])) { - $tables['uc_products']['fields']['weight']['option']['#options']['editable'] = t('Editable'); - } - else { - $tables['uc_products']['fields']['weight']['option'] = array( - '#type' => 'select', - '#options' => array( - 'display' => t('Display'), - 'editable' => t('Editable'), - ), - ); - } - $tables['uc_products']['fields']['weight']['form_parents'] = 'base][weight'; - } -}