Revision 344ba84d
Added by Francisco Revilla over 13 years ago
modules/cdm_dataportal/theme/cdm_dataportal.common.theme | ||
---|---|---|
2 | 2 |
// $Id$ |
3 | 3 |
|
4 | 4 |
/** |
5 |
* Copyright (C) 2007 EDIT |
|
6 |
* European Distributed Institute of Taxonomy |
|
7 |
* http://www.e-taxonomy.eu |
|
8 |
* |
|
9 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
|
10 |
* See http://www.mozilla.org/MPL/MPL-1.1.html for the full license terms. |
|
11 |
*/ |
|
5 |
* Copyright (C) 2007 EDIT
|
|
6 |
* European Distributed Institute of Taxonomy
|
|
7 |
* http://www.e-taxonomy.eu
|
|
8 |
*
|
|
9 |
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
|
10 |
* See http://www.mozilla.org/MPL/MPL-1.1.html for the full license terms.
|
|
11 |
*/
|
|
12 | 12 |
|
13 | 13 |
define(FOOTNOTE_ANNOTATIONS, 'annotations'); |
14 | 14 |
|
... | ... | |
112 | 112 |
function theme_cdm_annotations_as_footnotekeys($cdmBase, $footnote_list_key = array()){ |
113 | 113 |
$footNoteKeys = cdm_annotations_as_footnotekeys($cdmBase, $footnote_list_key); |
114 | 114 |
foreach($footNoteKeys as $a){ |
115 |
//$out .= theme('cdm_footnote_key', $a, $a->footnoteListKey, (isset($out)? ',' : ''));
|
|
116 |
$out .= theme('cdm_footnote_key', $a, (isset($out)? ',' : ''));
|
|
117 |
}
|
|
115 |
//$out .= theme('cdm_footnote_key', $a, $a->footnoteListKey, (isset($out)? ',' : ''));
|
|
116 |
$out .= theme('cdm_footnote_key', $a, (isset($out)? ',' : ''));
|
|
117 |
}
|
|
118 | 118 |
return $out; |
119 | 119 |
} |
120 | 120 |
|
121 | 121 |
|
122 | 122 |
function theme_cdm_annotation_footnotes($footnoteListKey, $enclosingTag = 'span'){ |
123 |
return theme('cdm_footnotes', $footnoteListKey . '-annotations', $enclosingTag);
|
|
123 |
return theme('cdm_footnotes', $footnoteListKey . '-annotations', $enclosingTag);
|
|
124 | 124 |
} |
125 | 125 |
|
126 | 126 |
function theme_cdm_annotation_content($AnnotationTO){ |
... | ... | |
175 | 175 |
if ($separator_off){ |
176 | 176 |
$separator = ''; |
177 | 177 |
} |
178 |
$out = '<span class="footnote-key footnote-key-'.$footnoteKey->keyStr.' member-of-footnotes-'.$footnoteKey->footnoteListKey.'">'.$separator
|
|
179 |
.'<a href="#footnote-'.$footnoteKey->keyStr.'">'.$footnoteKey->keyStr.'</a>'
|
|
180 |
.'</span>';
|
|
181 |
return $out;
|
|
178 |
$out = '<span class="footnote-key footnote-key-'.$footnoteKey->keyStr.' member-of-footnotes-'.$footnoteKey->footnoteListKey.'">'.$separator
|
|
179 |
.'<a href="#footnote-'.$footnoteKey->keyStr.'">'.$footnoteKey->keyStr.'</a>'
|
|
180 |
.'</span>';
|
|
181 |
return $out;
|
|
182 | 182 |
} |
183 | 183 |
|
184 | 184 |
function theme_cdm_footnote($footnoteKey, $footnoteText){ |
185 |
_add_js_footnotes();
|
|
186 |
$out = '<span class="footnote footnote-'.$footnoteKey.'"><a name="footnote-'.$footnoteKey.'"></a><span class="footnote-anchor">'.$footnoteKey.'.</span> '.$footnoteText.'</span>';
|
|
187 |
return $out;
|
|
185 |
_add_js_footnotes();
|
|
186 |
$out = '<span class="footnote footnote-'.$footnoteKey.'"><a name="footnote-'.$footnoteKey.'"></a><span class="footnote-anchor">'.$footnoteKey.'.</span> '.$footnoteText.'</span>';
|
|
187 |
return $out;
|
|
188 | 188 |
} |
189 | 189 |
|
190 | 190 |
|
... | ... | |
196 | 196 |
|
197 | 197 |
function cdm_exist_footnote($footnote_list, $footnote){ |
198 | 198 |
$result = false; |
199 |
foreach ($footnote_list as $element){ |
|
200 |
if ($element == $footnote){ |
|
201 |
$result = true; |
|
199 |
if (is_array($footnote_list)){ |
|
200 |
foreach ($footnote_list as $element){ |
|
201 |
if ($element == $footnote){ |
|
202 |
$result = true; |
|
203 |
} |
|
202 | 204 |
} |
203 | 205 |
} |
204 | 206 |
return $result; |
... | ... | |
320 | 322 |
function _add_js_thickbox(){ |
321 | 323 |
// ---- jQuery thickbox: |
322 | 324 |
/* |
323 |
* bug: compat-1.0.js && thickbox.js line 237 .trigger("unload") |
|
324 |
* -> event is not triggered because of problems with compat-1.0.js' |
|
325 |
* see INSTALL.txt |
|
326 |
* |
|
327 |
*/ |
|
325 |
* bug: compat-1.0.js && thickbox.js line 237 .trigger("unload")
|
|
326 |
* -> event is not triggered because of problems with compat-1.0.js'
|
|
327 |
* see INSTALL.txt
|
|
328 |
*
|
|
329 |
*/
|
|
328 | 330 |
//drupal_add_js(drupal_get_path('module', 'cdm_dataportal').'/js/jquery.imagetool.min.js'); |
329 | 331 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal').'/js/thickbox/thickbox.js'); |
330 | 332 |
drupal_add_css(drupal_get_path('module', 'cdm_dataportal').'/js/thickbox/cdm_thickbox.css'); |
... | ... | |
353 | 355 |
} |
354 | 356 |
|
355 | 357 |
function _add_js_footnotes(){ |
356 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal').'/js/footnotes.js');
|
|
358 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal').'/js/footnotes.js');
|
|
357 | 359 |
} |
358 | 360 |
|
359 | 361 |
|
Also available in: Unified diff
fising ticket #1804