Mercurial > defr > drupal > scald > dnd
diff dnd_test/dnd_test.module @ 20:89fe0aca43d4
Refactored the entire interval system, and started on form behavior.
author | David Eads <eads@chicagotech.org> |
---|---|
date | Sun, 08 Mar 2009 20:29:57 -0500 |
parents | 0d557e6e73f7 |
children | 69db20fdbac2 |
line wrap: on
line diff
--- a/dnd_test/dnd_test.module Fri Mar 06 14:26:06 2009 -0600 +++ b/dnd_test/dnd_test.module Sun Mar 08 20:29:57 2009 -0500 @@ -54,6 +54,10 @@ 'arguments' => array('i' => NULL), 'template' => 'dnd-library-preview', ), + 'dnd_library_header' => array( + 'arguments' => array('page' => NULL), + 'template' => 'dnd-library-header', + ), ); } @@ -64,7 +68,7 @@ $page = ($_GET['page']) ? $_GET['page'] : 1; $test_library = dnd_test_generate_library($page); return drupal_json(array( - 'header' => '<h3>'. t('Test library: Page @page', array('@page' => $page)) .'</h3>', + 'header' => theme('dnd_library_header', $page), 'library' => $test_library['library'], 'editor_representations' => $test_library['editor_representations'], 'library_previews' => $test_library['library_previews'], @@ -150,7 +154,6 @@ $variables['sizes'] = '<ul><li>'. implode('</li><li>', $sizes) .'</li></ul>'; } - function template_preprocess_dnd_editor_item(&$variables) { list($i, $size) = array($variables['i'], $variables['size']); @@ -165,3 +168,5 @@ } $variables['image'] = theme('image', drupal_get_path('module', 'dnd_test') .'/img/item-'. $img .'-'. $size .'.jpg', 'foo', 'foo', array('class' => 'dnd-dropped')); } + +function template_preprocess_dnd_library_header(&$variables) {}