فهرست منبع

Fixed formatting issues

spficklin 13 سال پیش
والد
کامیت
86e9bfad57

+ 17 - 21
base/tripal_views_integration/includes/tripal_views_integration.admin.inc

@@ -234,8 +234,8 @@ function tripal_views_integration_new_setup_form(&$form_state){
               "<div class=\"column-id\">Field Name and Type</div>".
               "<div class=\"fields-column-join\">Join Table</div>".
               "<div class=\"fields-column-join-column\">Join Column</div>".
-              "<div class=\"fields-column-handler-filter\">Handler: Filter</div></div>".
-    					"<div class=\"fields-column-handler-field\">Handler: Field</div></div>",
+              "<div class=\"fields-filter-handler\">Filter Handler</div>".
+              "<div class=\"fields-field-handler\">Field Handler</div></div>",
     );
 
     $data['field_types'] = array();
@@ -269,7 +269,7 @@ function tripal_views_integration_new_setup_form(&$form_state){
         '#required' => FALSE,
         '#default_value' => $table,
         '#ahah' => array(
-           'path' => ahah_helper_path(array('view_setup_table',"fields_join_column_$mview_id-$i")),
+           'path' => ahah_helper_path(array("view_setup_table","fields_join_column_$mview_id-$i")),
            'wrapper' => "fields-column-join-column-$mview_id-$i",
            'effect' => 'fade',
            'event' => 'change',
@@ -290,20 +290,20 @@ function tripal_views_integration_new_setup_form(&$form_state){
         '#required' => FALSE,
       );
       
-      $form['view_setup_table']["fields_handler_filter_$mview_id-$i"] = array(
+      $form['view_setup_table']["fields_filter_handler_$mview_id-$i"] = array(
         '#type' => 'select',
-        '#prefix' => "<div class=\"fields-column-handler-filter\">",
+        '#prefix' => "<div class=\"fields-filter-handler\">",
         '#suffix' => "</div>",
         '#options' => $handlers_filters,
         '#required' => FALSE,
       );
       
-      $form['view_setup_table']["fields_handler_field_$mview_id-$i"] = array(
-              '#type' => 'select',
-              '#prefix' => "<div class=\"fields-column-handler-field\">",
-              '#suffix' => "</div>",
-              '#options' => $handlers_fields,
-              '#required' => FALSE,
+      $form['view_setup_table']["fields_field_handler_$mview_id-$i"] = array(
+         '#type' => 'select',
+         '#prefix' => "<div class=\"fields-field-handler\">",
+         '#suffix' => "</div>",
+         '#options' => $handlers_fields,
+         '#required' => FALSE,
       );
       
       $form['view_setup_table']["fields_end_$i"] = array(
@@ -311,12 +311,15 @@ function tripal_views_integration_new_setup_form(&$form_state){
         '#value' => "</div>",
       );
       $i++;
-    }
+   }
+   $form['view_setup_table']['save'] = array(
+      '#type'  => 'submit',
+      '#value' => t('Save'),
+   );
+
     $data['row_count'] = $i - 1;
   }
 
-
-
   //use this to put values into $form_state['values']
   $form['data'] = array();
 
@@ -330,13 +333,6 @@ function tripal_views_integration_new_setup_form(&$form_state){
     );
   }
 
-
-  $form['save'] = array(
-  	'#type'  => 'submit',
-  	'#value' => t('Save'),
-  );
-
-
   return $form;
 }
 

+ 15 - 0
base/tripal_views_integration/tripal_views_integration.module

@@ -2,6 +2,21 @@
 
 require_once 'includes/tripal_views_integration.admin.inc';
 
+/**
+ * Implements hook_views_api()
+ *
+ * Purpose: Essentially this hook tells drupal that there is views support for
+ *  for this module which then includes tripal_db.views.inc where all the
+ *  views integration code is
+ *
+ * @ingroup tripal_views_integration
+ */ 
+function tripal_views_integration_views_api() {
+   return array(
+      'api' => 2.0,
+   );
+}
+
 /**
  *
  * @ingroup tripal_views_integration

+ 8 - 8
base/tripal_views_integration/tripal_views_integration_fields_form.tpl.php

@@ -9,7 +9,7 @@
 #tripal-views-integration-new-setup-form .form-item {
    margin: 0px 0px 5px 0px;
 }
-#tripal-views-integration-new-setup-form .column-id,.fields-column-join,.fields-column-join-column, .fields-column-handler-filter, .fields-column-handler-field {
+#tripal-views-integration-new-setup-form .column-id, .fields-column-join,.fields-column-join-column, .fields-filter-handler, .fields-field-handler {
    display: inline-block;
    margin: 0px;
    vertical-align: top;
@@ -29,19 +29,19 @@
    font-style: italic;
 }
 #tripal-views-integration-new-setup-form .column-id {
-   width: 20%;
+   width: 25%;
 }
 #tripal-views-integration-new-setup-form .fields-column-join {
-   width: 20%;
+   width: 25%;
 }
 #tripal-views-integration-new-setup-form .fields-column-join-column {
-   width: 20%;
+   width: 25%;
 }
-#tripal-views-integration-new-setup-form .fields-column-handler-filter {
-   width: 20%;
+#tripal-views-integration-new-setup-form .fields-filter-handler {
+   width: 10%;
 }
-#tripal-views-integration-new-setup-form .fields-column-handler-filed {
-   width: 20%;
+#tripal-views-integration-new-setup-form .fields-field-handler {
+   width: 10%;
 }
 
 </style>