|
75 | 75 | , 'inline'); |
76 | 76 | } |
77 | 77 |
|
78 | | - /** |
79 | | - */ |
80 | | - function drupal_add_js_rowToggle($tableId){ |
| 78 | + function _add_js_table_row_toggle($tableId){ |
81 | 79 |
|
82 | | - drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/table_modification.js'); |
| 80 | + drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/table_row_toggle.js'); |
83 | 81 | drupal_add_js('jQuery(document).ready(function(){ |
84 | 82 | addRowToggle("' . $tableId . '"); |
85 | 83 | }); |
86 | 84 | ', array('type' => 'inline')); |
87 | 85 | } |
88 | 86 |
|
89 | | - /** |
| 87 | + function _add_js_table_body_collapse(){ |
| 88 | + // the table_body_collapse plugin aill autoattach to all tables with class attribute 'table_body_collapse' |
| 89 | + drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/table_body_collapse.js'); |
| 90 | + } |
| 91 | + |
| 92 | +/** |
90 | 93 | * @param unknown_type $link_element_selector |
91 | 94 | * @param unknown_type $progress_element_selector |
92 | 95 | */ |
@@ -438,27 +441,27 @@ function _add_js_universalviewer($jquery_selector, $manifest_uri){ |
438 | 441 | ); |
439 | 442 | } |
440 | 443 |
|
441 | | - /** |
442 | | - * Provides the markup for an font awesome icon. |
443 | | - * |
444 | | - * The icons is created in default size without any extra features. |
445 | | - * |
446 | | - * The available icons are listed here http://fontawesome.io/cheatsheet/ |
447 | | - * fontawesome icons have much more features than implemented here in this function, |
448 | | - * for spinning icons, fixed width icons, rotation, etc please checkout the |
449 | | - * examples at http://fontawesome.io/examples/ |
450 | | - * |
451 | | - * @parameter $icon_name |
452 | | - * The name of the icon which starts with 'fa-' |
453 | | - * |
454 | | - * @return String |
455 | | - * the markup for the icon in an <i> tag |
456 | | - * |
457 | | - */ |
| 444 | +/** |
| 445 | + * Provides the markup for an font awesome icon. |
| 446 | + * |
| 447 | + * The icons is created in default size without any extra features. |
| 448 | + * |
| 449 | + * The available icons are listed here http://fontawesome.io/cheatsheet/ |
| 450 | + * fontawesome icons have much more features than implemented here in this function, |
| 451 | + * for spinning icons, fixed width icons, rotation, etc please checkout the |
| 452 | + * examples at http://fontawesome.io/examples/ |
| 453 | + * |
| 454 | + * @param $icon_name |
| 455 | + * The name of the icon which starts with 'fa-' |
| 456 | + * |
| 457 | + * @param array $attributes |
| 458 | + * |
| 459 | + * @return String |
| 460 | + * the markup for the icon in an <i> tag |
| 461 | + */ |
458 | 462 | function font_awesome_icon_markup($icon_name = NULL, $attributes = array()){ |
459 | 463 | _add_font_awesome_font(); |
460 | 464 |
|
461 | | - |
462 | 465 | if($icon_name){ |
463 | 466 | if(!isset($attributes['class'])){ |
464 | 467 | $attributes['class'] = array(); |
@@ -1788,18 +1791,7 @@ function specimen_by_accession_number_view($accession_number = null) { |
1788 | 1791 |
|
1789 | 1792 | // Display the page for the specimen defined by $uuid. |
1790 | 1793 | if (isset($field_unit_dto)){ |
1791 | | - $dto_array = array($field_unit_dto); |
1792 | | - $specimen_array = specimen_render_array_items($dto_array); |
1793 | | - $specimen_table = array( |
1794 | | - '#theme' => 'table', |
1795 | | - '#weight' => 2, |
1796 | | - // prefix attributes and rows with '#' to let it pass toF the theme function, |
1797 | | - // otherwise it is handled as child render array |
1798 | | - '#attributes' => array('class' => 'specimens'), |
1799 | | - '#rows' => array(), |
1800 | | - '#prefix' => '<div id="specimens">', |
1801 | | - '#suffix' => '</div>', |
1802 | | - ); |
| 1794 | + $specimen_array = compose_cdm_specimen_or_observation_tree_entry($field_unit_dto); |
1803 | 1795 | foreach($specimen_array as $value){ |
1804 | 1796 | $renderArray = array( |
1805 | 1797 | '#theme' => 'item_list', |
|
0 commit comments