Changeset 12538
- Timestamp:
- 02/19/08 15:43:47 (11 months ago)
- Files:
-
- 1 modified
-
util/branches/dev/jsdoc/jsdoc.module (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
util/branches/dev/jsdoc/jsdoc.module
r12537 r12538 1380 1380 $query = db_query("SELECT name, type, summary, optional, repeating FROM {jsdoc_parameters} WHERE vid = %d ORDER BY weight", $object->vid); 1381 1381 while ($parameter = db_fetch_array($query)) { 1382 $parameter['jsdoc_formatted'] = _jsdoc_format_type($parameter['type'], $parameter['optional'], $parameter['re curring']);1382 $parameter['jsdoc_formatted'] = _jsdoc_format_type($parameter['type'], $parameter['optional'], $parameter['repeating']); 1383 1383 $object->jsdoc_parameters[$parameter['name']] = $parameter; 1384 1384 } … … 3015 3015 $parameter->name = $item['name']; 3016 3016 $parameter->optional = $item['optional']; 3017 $parameter->re curring = $item['recurring'];3017 $parameter->repeating = $item['repeating']; 3018 3018 $parameter->types = false; 3019 3019 if ($cleaned) { … … 3023 3023 } 3024 3024 3025 $type = $ parameter->type;3025 $type = $item['type']; 3026 3026 $types = array(); 3027 3027 if (strpos($type, '|') !== false) { … … 3070 3070 $found = 0; 3071 3071 $field_type = str_replace('...', '', $field_type, $found); 3072 $re curring = ($found > 0);3072 $repeating = ($found > 0); 3073 3073 3074 3074 $field_obj = jsdoc_object_node_load($field_type, jsdoc_get_project($node), jsdoc_get_version($node), jsdoc_get_all_provide_nids($node, array(3, 4))); 3075 3075 $field_type = (object)array( 3076 3076 'title' => $field_obj->title, 3077 're curring' => $recurring,3077 'repeating' => $repeating, 3078 3078 'optional' => $optional, 3079 3079 'summary' => jsdoc_get_teaser($field_obj) … … 3100 3100 } 3101 3101 3102 function _jsdoc_format_type($type, $classlike = false, $optional = false, $re curring = false) {3102 function _jsdoc_format_type($type, $classlike = false, $optional = false, $repeating = false) { 3103 3103 $output = array(); 3104 3104 $name = ''; … … 3114 3114 $output['type'] .= '?'; 3115 3115 } 3116 if ($re curring) {3116 if ($repeating) { 3117 3117 $output['type'] .= '...'; 3118 3118 } … … 3583 3583 $signature .= '?'; 3584 3584 } 3585 if ($parameter->re curring) {3585 if ($parameter->repeating) { 3586 3586 $signature .= '...'; 3587 3587 } … … 4098 4098 $output .= '<div class="fieldset-wrapper">'; 4099 4099 foreach ($children as $child) { 4100 $output .= '<div class= "form-item">';4100 $output .= '<div class=F"form-item">'; 4101 4101 if ($child->type) { 4102 4102 $output .= '<em>' . $child->type->a . '</em> '; … … 4201 4201 4202 4202 $field_types = array(); 4203 $re curring = false;4203 $repeating = false; 4204 4204 $optional = false; 4205 4205 if ($field->types) { 4206 4206 foreach ($field->types as $type) { 4207 if ($type->re curring) {4208 $re curring = true;4207 if ($type->repeating) { 4208 $repeating = true; 4209 4209 } 4210 4210 if ($type->optional) { … … 4220 4220 } 4221 4221 $output .= $field->a; 4222 if ($re curring) {4223 $output .= ' <small><em>re curring</em></small>';4222 if ($repeating) { 4223 $output .= ' <small><em>repeating</em></small>'; 4224 4224 } 4225 4225 if ($optional) {